diff options
| author | Roland McGrath <roland@redhat.com> | 2003-04-04 04:12:17 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-04 04:12:17 -0800 |
| commit | da334d91ff7001d234863fc7692de1ff90bed57a (patch) | |
| tree | 9da90aa4af9abd01135740c0e1b77cd944c7c4ef /include/linux | |
| parent | 7777d006d3c38a0bbb254e35d96cf8f2b9f925a2 (diff) | |
[PATCH] linux-2.5.66-signal-cleanup.patch
Here is the cleanup patch I promised back in February. Sorry it took a
while.
The effects should be purely cosmetic in 2.5.66. However, the new
interface for the proper way to send thread-specific of process-global
signals from inside the kernel is needed for correct implementation of
some fixes to timer stuff that Ulrich told me about.
This cleans up some obsolete comments and macros in kernel/signal.c,
restores send_sig_info to its original behavior, and adds a global entry
point send_group_sig_info. I checked all the uses of send_sig and
send_sig_info and changed a few to send_group_sig_info.
I think it would be cleanest if the whole mess of *_sig* entry points were
reduced to two or three, but I did the change that minimized the number of
callers I had to fix up.
There should be no discernible difference, since the 2.5.66 send_sig_info
function did group semantics for those signals by number already. The only
exception to that is pdeath_signal, which I guess can be any signal number
but I deemed ought to be process-wide.
I did not change any of the calls using SIGKILL, though that does have
process-wide semantics. There is no need to change it since SIGKILL always
kills the whole group, though the code path for send_sig(SIGKILL,...) calls
in multithreaded processes will be different now.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/sched.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index d001088e58b3..f3b4c5891898 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -541,6 +541,7 @@ extern void block_all_signals(int (*notifier)(void *priv), void *priv, extern void unblock_all_signals(void); extern void release_task(struct task_struct * p); extern int send_sig_info(int, struct siginfo *, struct task_struct *); +extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); extern int force_sig_info(int, struct siginfo *, struct task_struct *); extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); extern int kill_pg_info(int, struct siginfo *, pid_t); @@ -558,6 +559,11 @@ extern int kill_proc(pid_t, int, int); extern int do_sigaction(int, const struct k_sigaction *, struct k_sigaction *); extern int do_sigaltstack(const stack_t *, stack_t *, unsigned long); +/* These can be the second arg to send_sig_info/send_group_sig_info. */ +#define SEND_SIG_NOINFO ((struct siginfo *) 0) +#define SEND_SIG_PRIV ((struct siginfo *) 1) +#define SEND_SIG_FORCED ((struct siginfo *) 2) + /* True if we are on the alternate signal stack. */ static inline int on_sig_stack(unsigned long sp) |
