summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2001-07-04 09:32:09 +0000
committerbrian <brian@cvs.openbsd.org>2001-07-04 09:32:09 +0000
commit5ab478f645d665752e3518b5fac7f57220aa2dc5 (patch)
tree130a50db9319a6c4535a803e82eeaf67df39955c /usr.sbin
parent86d9bcdc04b414ac711591dc9f45e9a16954cc88 (diff)
Make the last fix work properly on descriptors 1 and 2 (not just 0)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/ppp/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/main.c b/usr.sbin/ppp/ppp/main.c
index f16becbb533..38da9e1a36b 100644
--- a/usr.sbin/ppp/ppp/main.c
+++ b/usr.sbin/ppp/ppp/main.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: main.c,v 1.28 2001/07/04 03:33:41 brian Exp $
+ * $OpenBSD: main.c,v 1.29 2001/07/04 09:32:08 brian Exp $
*/
#include <sys/param.h>
@@ -311,7 +311,7 @@ main(int argc, char **argv)
return 2;
}
for (f = 1; f < sizeof holdfd / sizeof *holdfd; f++)
- dup2(holdfd[0], holdfd[f]);
+ holdfd[f] = dup(holdfd[0]);
name = strrchr(argv[0], '/');
log_Open(name ? name + 1 : argv[0]);