Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!ames!nrl-cmf!cmcl2!brl-adm!adm!rbj@icst-cmr.arpa From: rbj@icst-cmr.arpa (Root Boy Jim) Newsgroups: comp.unix.wizards Subject: Confusing documentation about system(3) in 4.3BSD? Message-ID: <12037@brl-adm.ARPA> Date: 1 Mar 88 00:27:01 GMT Sender: news@brl-adm.ARPA Lines: 22 From: Ron Natalie 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 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!!