linux-user: proper exit code for uncaught signals
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 15 Apr 2009 16:18:38 +0000 (16:18 +0000)
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 15 Apr 2009 16:18:38 +0000 (16:18 +0000)
commit603e4fd7b1e034f79181a53df9719818f80ba364
tree3e1f011d9dfed361b8df1c972963c52382beee31
parent3b3f24add09f8ab720860d4840f9755c102121b5
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>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7119 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user/signal.c