Confusing documentation about system(3) in 4.3BSD?
Root Boy Jim
rbj at icst-cmr.arpa
Tue Mar 1 10:27:01 AEST 1988
From: Ron Natalie <ron at topaz.rutgers.EDU>
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
Yes, he is. But aren't these two bytes mutually exclusive? Why not
just return the exit status byte, or the negative of the signal number
that killed it? Core dumping adds 256 to the signal number, and being
stopped adds 128 to the signal. Why is it so complex?
(Root Boy) Jim Cottrell <rbj at icst-cmr.arpa>
National Bureau of Standards
Flamer's Hotline: (301) 975-5688
Tex SEX! The HOME of WHEELS! The dripping of COFFEE!! Take me
to Minnesota but don't EMBARRASS me!!
More information about the Comp.unix.wizards
mailing list