linux-user: Proper exit code for uncaught signals
authorRiku Voipio <riku.voipio@iki.fi>
Sun, 23 Nov 2008 21:37:24 +0000 (23:37 +0200)
committerRiku Voipio <riku.voipio@nokia.com>
Fri, 13 Feb 2009 09:04:20 +0000 (11:04 +0200)
commit279a3b09668216a3d0f0dc55a96ddefe8f90adca
treee089eeb61441f258826916f20ef32f5c1224f25c
parent4e92f129f29b85fda67e28c7e7c8113ae9e67d01
linux-user: Proper exit code for uncaught signals

The proper exit code for dieing from an uncaught signal is -<signal>.
The kernel doesn't allow exit() or _exit() to pass a negative value.
To get the proper exit code we need to actually die from an uncaught
signal.

A default signal handler is installed, we send ourself a signal
and we wait for it to arrive.

Patch originates from Scratchbox

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
linux-user/signal.c