diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-12-16 15:57:17 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-12-16 15:57:17 +0000 |
commit | 71638aeb9686737ed993f18f8035c7b2817d523b (patch) | |
tree | 74fafdf3ad04c8fb01c2854ec92095462913df6e /gnu/usr.bin/bc | |
parent | 8698d7c239e560fe27d10ca89361035e36398d6f (diff) |
be more careful with select
Diffstat (limited to 'gnu/usr.bin/bc')
-rw-r--r-- | gnu/usr.bin/bc/bcwrap/bcwrap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gnu/usr.bin/bc/bcwrap/bcwrap.c b/gnu/usr.bin/bc/bcwrap/bcwrap.c index 3dc23619a67..e07f3a6e17a 100644 --- a/gnu/usr.bin/bc/bcwrap/bcwrap.c +++ b/gnu/usr.bin/bc/bcwrap/bcwrap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bcwrap.c,v 1.3 1996/08/24 20:41:36 deraadt Exp $ */ +/* $OpenBSD: bcwrap.c,v 1.4 1996/12/16 15:57:16 deraadt Exp $ */ /* * Copyright (c) 1996 Theo de Raadt <deraadt@theos.com> @@ -85,10 +85,10 @@ main(argc, argv) } width = pd[1]; - rfds = (1 << 0) || (1 << pd[1]); while (1) { if (waitpid(pid, &stat, WNOHANG) > 0) exit(WEXITSTATUS(stat)); + rfds = (1 << 0) || (1 << pd[1]); switch (select(width, (fd_set *)&rfds, NULL, NULL, NULL)) { case -1: case 0: |