Hi, Derek, Thank you very much for your example and patient explanation. That's pretty helpful. It's clear enough, while I also check wait(2) for complete document. (I have no that book. Maybe go buy it if it's pretty good.)
I'm trying to find out what the exit code 0xB4 means. best, charlie On Sat, Jan 19, 2002 at 12:53:13AM -0500, Derek D. Martin wrote: > At some point hitherto, Charles Jie hath spake thusly: > > > > Aborting... (command "/usr/bin/maildrop ~/.maildroprc" returned 19200 >(maildrop: signal 0x06)) > > > > > > > > I can not explain the 'returned 19200'. For someone's exercise. ;-) > > > > > > It's the exit code and the signal, encoded in a standard format. It's > > > not just the exit code. > > > > Really? That's beyond my knowledge. Pleae cite me for further info. > > Well, I haven't seen the code, but it's probably the status field of > the wait(2) system call. For details, see man 2 wait. Here's a > little program that will give you a breakdown: > > Assuming this is what we're dealing with, it should mean that the > program exited normally (WIFEXITED = 1) and that the exit status was > 0x4b, or 60 decimal. It was not killed by a signal (WIFSIGNALED = 0), > nor was it stopped (WIFSTOPPED = 0). The value 4b associated with the > WSTOPSIG macro is meaningless, because WIFSTOPPED is false. There's > also a good discussion of this in W. Richard Stevens, "Advanced > Programming in the Unix Environment" if you're interested. >