Catching termination of child process and system() call

Doug Gwyn gwyn at smoke.brl.mil
Tue Feb 19 12:49:48 AEST 1991


In article <2608 at root44.co.uk> gwc at root.co.uk (Geoff Clare) writes:
>POSIX does not specify the precise encoding of information in the status
>returned by wait(), system(), etc., so portable programs should not
>rely on the traditional encoding Chris describes above.  Instead macros
>are provided in <sys/wait.h> to extract the relevant data from the status:

(1)  PORTABLE programs MUST follow Chris's recommendation; not all
existing UNIX environments provide the macros to which you alluded.
PORTABLE != POSIX

(2)  Does POSIX really neglect to specify the bits?  Certainly as of
the trial-use 1003.1 standard the bits were specified.  In any case,
all UNIX systems must continue to act as Chris decided, regardless of
whether POSIX requires additional facilities for this.



More information about the Comp.unix.programmer mailing list