Confusing documentation about system(3) in 4.3BSD?

Ron Natalie ron at topaz.rutgers.edu
Sun Feb 28 01:08:59 AEST 1988


You're confusing shell exit status (to itself) and the process
exit status available to C programs (via wait).  Read the wait(2)
manual page.  The high byte during normal operation contains
the arghument from the exit sys-call in the child.  The low byte
contains the process termination status.  This usually means
whether the process died of some signal (like Illegal Instruction,
Memory Fault, Bus Error, etc...) and whether or not it dumped core.

-Ron



More information about the Comp.unix.wizards mailing list