On 14 March 2013 21:18, Alan Somers <[email protected]> wrote: > I noticed that when a command run by ksh93 is killed by SIGABRT, it returns > an exit status of 262. This is contrary to the behavior of dash, bash, zsh, > csh, tcsh, and mksh, which all return 134. It also seems contrary to the > sus, which specifies that "the special parameter '?', the shell shall report > the full eight bits of exit status available".
Why is this contrary to the standard? dash, bash and zsh are in violation of the SUS recommendations here and add 128 to the exit code. If on any platform the exit code is already above 127 then the uppermost bit is lost. Using 128 to add to the signal number is ONLY legacy behaviour and NOT recommended because it can lead to loss of information, in fact all new shell should use 256+signal number. Ced -- Cedric Blancher <[email protected]> Institute Pasteur _______________________________________________ ast-developers mailing list [email protected] http://lists.research.att.com/mailman/listinfo/ast-developers
