From: deraadt Date: Mon, 16 Dec 1996 15:57:16 +0000 (+0000) Subject: be more careful with select X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=5cf9f98edb6c2b30c1f6f845d3ccc108efde0d7c;p=openbsd be more careful with select --- 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 @@ -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: