diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-29 20:15:04 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2021-10-29 20:15:04 +0000 |
commit | d9f083b61bd93fac8d98eede337443d88466c03b (patch) | |
tree | 314ca7aabc0197f34ddeba33b8f2ce0db3af6fe5 /regress | |
parent | 388a767ec2a1bd1f067c77815ff306a2b3d83214 (diff) |
If the test fails, do not hang forever. Abort with a 10 seconds
timeout.
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/kern/poll/pollnval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/regress/sys/kern/poll/pollnval.c b/regress/sys/kern/poll/pollnval.c index adc9132e473..95be7eac710 100644 --- a/regress/sys/kern/poll/pollnval.c +++ b/regress/sys/kern/poll/pollnval.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pollnval.c,v 1.1 2021/10/29 13:13:04 mpi Exp $ */ +/* $OpenBSD: pollnval.c,v 1.2 2021/10/29 20:15:03 bluhm Exp $ */ /* * Copyright (c) 2021 Leah Neukirchen <leah@vuxu.org> @@ -26,6 +26,9 @@ main(void) { struct pollfd fds[1]; + /* Do not hang forever, abort with timeout. */ + alarm(10); + fds[0].fd = 0; fds[0].events = POLLIN | POLLHUP; close(0); |