From: "Ara.T.Howard" Date: 2004-01-15T17:06:37+09:00 Subject: (Process.wait2)[1] my understanding was that Process.wait2[1] would be the child process exit_status, so this is confusing: ~ > ls -e; echo $? ls: invalid option -- e Try `ls --help' for more information. 1 ~ > ruby -e 'fork{exec "ls -e"}; puts((Process.wait2)[1])' ls: invalid option -- e Try `ls --help' for more information. 256 ~ > ruby -e 'fork{exec "ls -e"}; puts((Process.wait2))' ls: invalid option -- e Try `ls --help' for more information. 3388 256 ~ > ruby -e 'fork{exec "ls -e"}; p((Process.wait2))' ls: invalid option -- e Try `ls --help' for more information. [3399, #] obviously 256 is 1 << 8 and this is equivalent to $? - the exitstatus. can someone eplain what the lower byte is then? -a -- ATTN: please update your address books with address below! =============================================================================== | EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov | PHONE :: 303.497.6469 | ADDRESS :: E/GC2 325 Broadway, Boulder, CO 80305-3328 | STP :: http://www.ngdc.noaa.gov/stp/ | NGDC :: http://www.ngdc.noaa.gov/ | NESDIS :: http://www.nesdis.noaa.gov/ | NOAA :: http://www.noaa.gov/ | US DOC :: http://www.commerce.gov/ | | The difference between art and science is that science is what we | understand well enough to explain to a computer. | Art is everything else. | -- Donald Knuth, "Discover" | | /bin/sh -c 'for l in ruby perl;do $l -e "print \"\x3a\x2d\x29\x0a\"";done' ===============================================================================