diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2006-10-02 05:17:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-02 10:57:13 -0400 |
commit | c4b92fc112f7be5cce308128236ff75cc98535c3 (patch) | |
tree | ea4dfac4355c64decbf6aa1ca65af76af43b90fb /include/linux | |
parent | 558cb325485aaf655130f140e8ddd25392f6c972 (diff) |
[PATCH] pid: implement signal functions that take a struct pid *
Currently the signal functions all either take a task or a pid_t argument.
This patch implements variants that take a struct pid *. After all of the
users have been update it is my intention to remove the variants that take a
pid_t as using pid_t can be more work (an extra hash table lookup) and
difficult to get right in the presence of multiple pid namespaces.
There are two kinds of functions introduced in this patch. The are the
general use functions kill_pgrp and kill_pid which take a priv argument that
is ultimately used to create the appropriate siginfo information, Then there
are _kill_pgrp_info, kill_pgrp_info, kill_pid_info the internal implementation
helpers that take an explicit siginfo.
The distinction is made because filling out an explcit siginfo is tricky, and
will be even more tricky when pid namespaces are introduced.
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/sched.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 660b02f80523..dd6c2164e4a4 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1267,6 +1267,11 @@ extern int send_sig_info(int, struct siginfo *, struct task_struct *); | |||
1267 | extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); | 1267 | extern int send_group_sig_info(int, struct siginfo *, struct task_struct *); |
1268 | extern int force_sigsegv(int, struct task_struct *); | 1268 | extern int force_sigsegv(int, struct task_struct *); |
1269 | extern int force_sig_info(int, struct siginfo *, struct task_struct *); | 1269 | extern int force_sig_info(int, struct siginfo *, struct task_struct *); |
1270 | extern int __kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); | ||
1271 | extern int kill_pgrp_info(int sig, struct siginfo *info, struct pid *pgrp); | ||
1272 | extern int kill_pid_info(int sig, struct siginfo *info, struct pid *pid); | ||
1273 | extern int kill_pgrp(struct pid *pid, int sig, int priv); | ||
1274 | extern int kill_pid(struct pid *pid, int sig, int priv); | ||
1270 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); | 1275 | extern int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp); |
1271 | extern int kill_pg_info(int, struct siginfo *, pid_t); | 1276 | extern int kill_pg_info(int, struct siginfo *, pid_t); |
1272 | extern int kill_proc_info(int, struct siginfo *, pid_t); | 1277 | extern int kill_proc_info(int, struct siginfo *, pid_t); |