summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-11-05 04:42:31 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-11-05 04:42:31 +0000
commitcb96a9cf782cdc97c638c5feb43954fe25bd0531 (patch)
treea838f186d6c73f1431889e2ec0c93428609dfb2d /sys/kern
parent2dd2ee9889fb488614d3490337e66913d35ef01a (diff)
Correct error returns from tcsetpgrp() aka ioctl(, TIOCSPGRP, )
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/tty.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c
index ee7611e1107..090c5316f09 100644
--- a/sys/kern/tty.c
+++ b/sys/kern/tty.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tty.c,v 1.13 1996/11/04 09:00:09 deraadt Exp $ */
+/* $OpenBSD: tty.c,v 1.14 1996/11/05 04:42:30 tholo Exp $ */
/* $NetBSD: tty.c,v 1.68.4.2 1996/06/06 16:04:52 thorpej Exp $ */
/*-
@@ -896,7 +896,9 @@ ttioctl(tp, cmd, data, flag, p)
if (!isctty(p, tp))
return (ENOTTY);
- else if (pgrp == NULL || pgrp->pg_session != p->p_session)
+ else if (pgrp == NULL)
+ return (EINVAL);
+ else if (pgrp->pg_session != p->p_session)
return (EPERM);
tp->t_pgrp = pgrp;
break;