diff options
Diffstat (limited to 'kernel/signal.c')
-rw-r--r-- | kernel/signal.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 39d122753bac..ef8156a6aad5 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -255,6 +255,16 @@ flush_signal_handlers(struct task_struct *t, int force_default) | |||
255 | } | 255 | } |
256 | } | 256 | } |
257 | 257 | ||
258 | int unhandled_signal(struct task_struct *tsk, int sig) | ||
259 | { | ||
260 | if (is_init(tsk)) | ||
261 | return 1; | ||
262 | if (tsk->ptrace & PT_PTRACED) | ||
263 | return 0; | ||
264 | return (tsk->sighand->action[sig-1].sa.sa_handler == SIG_IGN) || | ||
265 | (tsk->sighand->action[sig-1].sa.sa_handler == SIG_DFL); | ||
266 | } | ||
267 | |||
258 | 268 | ||
259 | /* Notify the system that a driver wants to block all signals for this | 269 | /* Notify the system that a driver wants to block all signals for this |
260 | * process, and wants to be notified if any signals at all were to be | 270 | * process, and wants to be notified if any signals at all were to be |