summaryrefslogtreecommitdiff
path: root/sys/compat
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-11-01 05:59:22 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-11-01 05:59:22 +0000
commitaa813f454ea87b333effafe597d250f4340b3432 (patch)
tree228067666e617b0710c893c00beabe232089090d /sys/compat
parent4970aa6bbe2ea68e5cfcb70b07f73ae27f5702c1 (diff)
change all callers of enterpgrp() to pre-allocate a pgrp or session if
it might be needed later -- before calling pfind(), so that enterpgrp() can operate without sleeping ok tedu
Diffstat (limited to 'sys/compat')
-rw-r--r--sys/compat/hpux/hpux_compat.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sys/compat/hpux/hpux_compat.c b/sys/compat/hpux/hpux_compat.c
index a1c2e0f65b9..73193038c6f 100644
--- a/sys/compat/hpux/hpux_compat.c
+++ b/sys/compat/hpux/hpux_compat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: hpux_compat.c,v 1.29 2007/09/22 09:57:40 martin Exp $ */
+/* $OpenBSD: hpux_compat.c,v 1.30 2008/11/01 05:59:21 deraadt Exp $ */
/* $NetBSD: hpux_compat.c,v 1.35 1997/05/08 16:19:48 mycroft Exp $ */
/*
@@ -63,6 +63,7 @@
#include <sys/stat.h>
#include <sys/syslog.h>
#include <sys/malloc.h>
+#include <sys/pool.h>
#include <sys/mount.h>
#include <sys/ipc.h>
#include <sys/user.h>
@@ -1163,9 +1164,12 @@ hpux_sys_setpgrp_6x(p, v, retval)
void *v;
register_t *retval;
{
+ struct pgrp *npgrp;
+
+ npgrp = pool_get(&pgrp_pool, PR_WAITOK);
if (p->p_pid != p->p_pgid)
- enterpgrp(p, p->p_pid, 0);
+ enterpgrp(p, p->p_pid, npgrp, NULL);
*retval = p->p_pgid;
return (0);
}