diff options
| author | Ulrich Drepper <drepper@redhat.com> | 2003-07-04 04:57:37 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.osdl.org> | 2003-07-04 04:57:37 -0700 |
| commit | c7aa953c75afbbd212e5b4e6f859b2d32f55b22e (patch) | |
| tree | c4e04a039f45d32ab5354eb3c64efb93b89e6061 /kernel | |
| parent | 9e008c3c401ea935ef32593ddeda0a4963fab6f9 (diff) | |
[PATCH] wrong pid in siginfo_t
If a signal is sent via kill() or tkill() the kernel fills in the wrong
PID value in the siginfo_t structure (obviously only if the handler has
SA_SIGINFO set).
POSIX specifies the the si_pid field is filled with the process ID, and
in Linux parlance that's the "thread group" ID, not the thread ID.
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/signal.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/signal.c b/kernel/signal.c index 4768ea5bab22..dbefbea7623e 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -2082,7 +2082,7 @@ sys_kill(int pid, int sig) info.si_signo = sig; info.si_errno = 0; info.si_code = SI_USER; - info.si_pid = current->pid; + info.si_pid = current->tgid; info.si_uid = current->uid; return kill_something_info(sig, &info, pid); @@ -2105,7 +2105,7 @@ sys_tkill(int pid, int sig) info.si_signo = sig; info.si_errno = 0; info.si_code = SI_TKILL; - info.si_pid = current->pid; + info.si_pid = current->tgid; info.si_uid = current->uid; read_lock(&tasklist_lock); |
