summaryrefslogtreecommitdiff
path: root/sys/kern/uipc_syscalls.c
diff options
context:
space:
mode:
authorPhilip Guenthe <guenther@cvs.openbsd.org>2008-12-16 07:57:29 +0000
committerPhilip Guenthe <guenther@cvs.openbsd.org>2008-12-16 07:57:29 +0000
commit66f602cf3edb31a30ff3fcee9bd3d4b9d4ff57a7 (patch)
tree446062b72d3d878e3dd07d974267043287dbbd8b /sys/kern/uipc_syscalls.c
parent799c9944fa8bbbc14aab0bb61b58d2823678bc31 (diff)
Move the functionality of psignal() to a new function ptsignal()
that takes an additional argument "type" that indicates whether the signal is for the process, just a particular thread, or propagated to a thread because it's not caught or blocked. psignal() becomes a wrapper that does the first of those. So that sys_kill() can tell apart signals for the process and signals for the process's original thread, the tid of the original thread is defined as its pid + THREAD_PID_OFFSET. ok tedu@ art@ andreas@ kurt@ "better early than late" deraadt@
Diffstat (limited to 'sys/kern/uipc_syscalls.c')
-rw-r--r--sys/kern/uipc_syscalls.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c
index 288f69c2097..cf19553804f 100644
--- a/sys/kern/uipc_syscalls.c
+++ b/sys/kern/uipc_syscalls.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipc_syscalls.c,v 1.68 2008/05/23 15:51:12 thib Exp $ */
+/* $OpenBSD: uipc_syscalls.c,v 1.69 2008/12/16 07:57:28 guenther Exp $ */
/* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */
/*
@@ -523,7 +523,7 @@ sendit(struct proc *p, int s, struct msghdr *mp, int flags, register_t *retsize)
error == EINTR || error == EWOULDBLOCK))
error = 0;
if (error == EPIPE)
- psignal(p, SIGPIPE);
+ ptsignal(p, SIGPIPE, STHREAD);
}
if (error == 0) {
*retsize = len - auio.uio_resid;