patch-2.1.90 linux/kernel/signal.c
Next file: linux/kernel/sys.c
Previous file: linux/kernel/sched.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
Wed Mar 11 15:57:39 1998
- Orig file:
v2.1.89/linux/kernel/signal.c
- Orig date:
Tue Mar 10 10:03:36 1998
diff -u --recursive --new-file v2.1.89/linux/kernel/signal.c linux/kernel/signal.c
@@ -438,8 +438,16 @@
inline int
kill_proc_info(int sig, struct siginfo *info, pid_t pid)
{
- struct task_struct *p = find_task_by_pid(pid);
- return p ? send_sig_info(sig, info, p) : -ESRCH;
+ int error;
+ struct task_struct *p;
+
+ read_lock(&tasklist_lock);
+ p = find_task_by_pid(pid);
+ error = -ESRCH;
+ if (p)
+ error = send_sig_info(sig, info, p);
+ read_unlock(&tasklist_lock);
+ return error;
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov