From: Mike Fletcher Date: 2007-02-06T05:52:55+09:00 Subject: Re: 'ruby' exit code 32512 unknown wrote: > Hi, I was having trouble with what seems to be an inconsistency in > ruby exit codes. I can explain this best with examples: > > On Windows XP, the command: > ruby -e 'exit(32512)' || echo hi > > yeilds output (as it seems it should): > hi > > whereas on Mac OS X Darwin, the same command does not output anything > (where I expect it to output "hi"). Ruby on OS X behaves as I would > expect if other exit codes are used. Not sure about Windows, but a quick glance through Stevens' _Advanced Programming in the UNIX Environment_ reinforces my off-the-cuff recollection that POSIX doesn't specify more than allowing an 8-bit exit status code to make it through. See the wait(2) manual page for the documentation for the WEXITSTATUS(status) macro, which on both OS X and Linux specifically mention 8-bits. -- Posted via http://www.ruby-forum.com/.