[Overview][Constants][Types][Procedures and functions][Variables][Index] Reference for unit 'Unix' (#rtl)

WaitProcess

Wait for process to terminate.

Declaration

Source position: unix.pp line 94

function WaitProcess(

  Pid: cint

):cint;

Description

WaitProcess waits for process PID to exit. WaitProcess is equivalent to the #rtl.baseunix.FpWaitPID call:

FpWaitPid(PID,@result,0)

Handles of Signal interrupts (errno=EINTR), and returns the Exitcode of Process PID (>=0) or -Status if it was terminated

Errors

None.

See also

#rtl.baseunix.FpWaitPID

  

Wait for a process to terminate

#rtl.baseunix.WTERMSIG

  

Return the signal that caused a process to exit.

#rtl.baseunix.WSTOPSIG

  

Return the exit code from the process.

#rtl.baseunix.WIFEXITED

  

Check whether the process exited normally

WIFSTOPPED

  

Check whether the process is currently stopped.

#rtl.baseunix.WIFSIGNALED

  

Check whether the process was exited by a signal.

W_EXITCODE

  

Construct an exit status based on an return code and signal.

W_STOPCODE

  

Construct an exit status based on a signal.

#rtl.baseunix.WEXITSTATUS

  

Extract the exit status from the fpWaitPID result.


Documentation generated on: Nov 16 2015