Topic : The ATARI Compendium
Author : Scott Sanders / JAY Software
Version : 1.25 (20/6/2003)
Subject : Documentation
Nodes : 1117
Index Size : 32614
HCP-Version : 6
Compiled on : Atari
@charset : UTF-8
@lang : en
@default :
@help : %About
@options : +g -i -t4 +y +z
@width : 100
View Ref-FilePexec()Pterm()Ptermres()Pterm0()Pwait() GEMDOSSyntaxLONG Pwait( VOID )
Function Pwait() attempts to determine the exit code of a stopped or
terminated child process.
Opcode 265 (0x109)
Availability This function is available under all MiNTversions integrated with MultiTOS.
Binding move.w #$109,-(sp)
trap #1
addq.l #2,sp
Return Value Pwait() returns 0 if no child processes have terminated or
a 32-bit return code for a child process which has been
terminated or stopped. The process ID of the child process
is placed in the upper 16 bits. A process which returned an
exit status (via Pterm(), Ptermres(), or Pterm0() ) returns
the exit code in the lower 16 bits. A process which was
stopped as the result of a signal returns 0xnn7F where nn is
the signal number which stopped it. A process which was
terminated as the result of a signal returns 0xnn00 where nn
is the signal number which killed the process.
Comments Pwait() will block the calling process until at least one
child has been stopped or terminated. Once the exit code of
a process has been returned with this call it will be not
be returned again with this call (unless it had been stopped
and is restarted and stopped again). This call is identical
to Pwait3( 2, NULL );
See Also Pexec(), Pterm(), Ptermres(), Pterm0()