[OT] Re: return level?

Matthias Andree matthias.andree at gmx.de
Tue Feb 18 22:59:50 CET 2003


Greg Louis <glouis at dynamicro.on.ca> writes:

> And yours is more up to date.  A better source still is the current
> glibc documentation:
>
> Exit Status
> -----------
>
>    When a program exits, it can return to the parent process a small
> amount of information about the cause of termination, using the "exit
> status".  This is a value between 0 and 255 that the exiting process
> passes as an argument to `exit'.
>
> So you're right: in this context, only the low 8 bits matter.

May I ask all of the interested parties to read waitpid(2) instead? The
original suspicion that 256 might be shifted by 8 bits is correct; the
application that misrepresents the bogofilter exit code as being 256
should have used the WEXITSTATUS macro (POSIX btw), but failed to do
so. Fix the caller.

-- 
Matthias Andree




More information about the Bogofilter mailing list