We always handled signals as if their SA_RESTART flag was set - but that's not

the default case.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19711 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2007-01-05 19:27:48 +00:00
parent 4621a82e74
commit 92870c3b39
+8 -1
View File
@@ -76,6 +76,7 @@ handle_signals(struct thread *thread)
& ~atomic_get(&thread->sig_block_mask);
struct sigaction *handler;
bool reschedule = false;
bool restart = false;
int32 i;
// If SIGKILL[THR] are pending, we ignore other signals.
@@ -110,6 +111,9 @@ handle_signals(struct thread *thread)
TRACE(("Thread 0x%lx received signal %s\n", thread->id, sigstr[signal]));
if ((handler->sa_flags & SA_RESTART) != 0)
restart = true;
if (handler->sa_handler == SIG_IGN) {
// signal is to be ignored
// ToDo: apply zombie cleaning on SIGCHLD
@@ -197,7 +201,10 @@ handle_signals(struct thread *thread)
return reschedule;
}
arch_check_syscall_restart(thread);
// only restart if SA_RESTART was set on at least one handler
if (restart)
arch_check_syscall_restart(thread);
return reschedule;
}