On Fri, Mar 15, 2013 at 4:15 PM, Alan Somers <[email protected]> wrote: > Thanks for the quick replies everyone. It sounds like "kill -l" is the best > portable way to deal with signals' exit statuses. I never saw the Rationale > section of the standard. I wonder if the standard was influenced by ksh here?
No, the behaviour of the old Bourne shell (bsh) was dumb. It assumed that of the 8 bits allowed by UNIX only 7 bits are used and the 8th bit can be used to reflect signal return codes. The POSIX and SUS standards could not (unfortunately) disallow the legacy behaviour of 128+signal number used by bsh but could *recommend* a better solution, which is to add 256+signal number. The real *crime* is that the legacy behaviour is continued in modern shells like bash or dash. Please blame those authors for violating a standard *recommendation*. Irek _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
