summaryrefslogtreecommitdiffstats
path: root/regress/sys
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2020-01-08 16:27:40 +0000
committervisa <visa@openbsd.org>2020-01-08 16:27:40 +0000
commit36b1b8b4dfaf3411193c17c2462937014292f2df (patch)
tree81f30bc60ac32c23151dd9b7753c67c177381297 /regress/sys
parentConvert infinite sleeps to tsleep_nsec(9). (diff)
downloadwireguard-openbsd-36b1b8b4dfaf3411193c17c2462937014292f2df.tar.xz
wireguard-openbsd-36b1b8b4dfaf3411193c17c2462937014292f2df.zip
Unify handling of ioctls FIOSETOWN/SIOCSPGRP/TIOCSPGRP and
FIOGETOWN/SIOCGPGRP/TIOCGPGRP. Do this by determining the meaning of the ID parameter inside the sigio code. Also add cases for FIOSETOWN and FIOGETOWN where there have been TIOCSPGRP and TIOCGPGRP before. These changes allow removing the ID translation from sys_fcntl() and sys_ioctl(). Idea from NetBSD OK mpi@, claudio@
Diffstat (limited to 'regress/sys')
-rw-r--r--regress/sys/dev/wscons/sigio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/regress/sys/dev/wscons/sigio.c b/regress/sys/dev/wscons/sigio.c
index eefdcbf3fba..02d4c58fb50 100644
--- a/regress/sys/dev/wscons/sigio.c
+++ b/regress/sys/dev/wscons/sigio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sigio.c,v 1.4 2018/12/17 19:26:25 anton Exp $ */
+/* $OpenBSD: sigio.c,v 1.5 2020/01/08 16:27:40 visa Exp $ */
/*
* Copyright (c) 2018 Anton Lindqvist <anton@openbsd.org>
@@ -208,7 +208,7 @@ test_common_getown(int fd, int dofcntl)
errx(1, "ioctl: FIOGETOWN: expected 0, got %d", pgrp);
}
- arg = getpid();
+ arg = -getpgrp();
if (ioctl(fd, FIOSETOWN, &arg) == -1)
err(1, "ioctl: FIOSETOWN");
if (dofcntl) {