diff options
author | jhb <jhb@FreeBSD.org> | 2010-06-29 20:44:19 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2010-06-29 20:44:19 +0000 |
commit | 44b49a3eaabb1d905f97eb9095f7d07ef42f5081 (patch) | |
tree | e04462dab1f180c2658b0af301bb1a8f44f5e284 /sys/kern/uipc_syscalls.c | |
parent | df7979cf7647002841f39b7e20cc8fbc4c413545 (diff) | |
download | FreeBSD-src-44b49a3eaabb1d905f97eb9095f7d07ef42f5081.zip FreeBSD-src-44b49a3eaabb1d905f97eb9095f7d07ef42f5081.tar.gz |
Send SIGPIPE to the thread that issued the offending system call
rather than to the entire process.
Reported by: Anit Chakraborty
Reviewed by: kib, deischen (concept)
MFC after: 1 week
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r-- | sys/kern/uipc_syscalls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 6585e83..3165dab 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -794,7 +794,7 @@ kern_sendit(td, s, mp, flags, control, segflg) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } @@ -2444,7 +2444,7 @@ sctp_generic_sendmsg (td, uap) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(uap->flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } @@ -2562,7 +2562,7 @@ sctp_generic_sendmsg_iov(td, uap) if (error == EPIPE && !(so->so_options & SO_NOSIGPIPE) && !(uap->flags & MSG_NOSIGNAL)) { PROC_LOCK(td->td_proc); - psignal(td->td_proc, SIGPIPE); + tdsignal(td, SIGPIPE); PROC_UNLOCK(td->td_proc); } } |