0x0D = 13 is SIGPIPE
0x8D = 141 is 13 + 128

sh likes to use $? > 128 for "killed by signal $?-128", whereas wait()
stores them independently.  system() returns the same value as wait();
system(false) evaluates to 256, since the return value (parameter to
exit() or "return" from main()) is the high 8 bits of a word; so this
is 1<<8.  The low 7 bits are signal; bit 8 of the low byte is "core
was dumped".

I don't know if both cases are necessary, but I suspect the intent is
to handle the direct pipe(2) case as well as the pipe with shell case.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to