Index: qemu/cpu-exec.c =================================================================== --- qemu.orig/cpu-exec.c 2007-03-26 13:51:50.000000000 -0400 +++ qemu/cpu-exec.c 2007-03-26 13:52:21.000000000 -0400 @@ -952,10 +952,15 @@ a virtual CPU fault */ cpu_restore_state(tb, env, pc, puc); } + if( ret == 1 ) { + sigprocmask(SIG_SETMASK, old_set, NULL); + //raise_exception_err(env->exception_index, env->error_code); + } else { /* we restore the process signal mask as the sigreturn should do it (XXX: use sigsetjmp) */ sigprocmask(SIG_SETMASK, old_set, NULL); cpu_loop_exit(); + } } #elif defined(TARGET_SPARC) static inline int handle_cpu_signal(unsigned long pc, unsigned long address, Index: qemu/linux-user/signal.c =================================================================== --- qemu.orig/linux-user/signal.c 2007-03-26 13:51:50.000000000 -0400 +++ qemu/linux-user/signal.c 2007-03-26 13:52:21.000000000 -0400 @@ -422,7 +422,7 @@ struct sigaction act1; int host_sig; - if (sig < 1 || sig > TARGET_NSIG) + if (sig < 1 || sig > TARGET_NSIG || sig == SIGKILL || sig == SIGSTOP) return -EINVAL; k = &sigact_table[sig - 1]; #if defined(DEBUG_SIGNAL)