summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-07-04 09:32:34 +0000
committerbrian <brian@FreeBSD.org>2001-07-04 09:32:34 +0000
commitb44d6474dfab6b663713a555c7365f41a74b8f80 (patch)
tree2519cbcc0c60189716ca14c7a577fe9ef3cb6ea2 /usr.sbin
parentb1c9f4a4616e32e7eaa61b9c53060ae68bf8e5c1 (diff)
downloadFreeBSD-src-b44d6474dfab6b663713a555c7365f41a74b8f80.zip
FreeBSD-src-b44d6474dfab6b663713a555c7365f41a74b8f80.tar.gz
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/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/ppp/main.c b/usr.sbin/ppp/main.c
index 968e6d2..b7de8a5 100644
--- a/usr.sbin/ppp/main.c
+++ b/usr.sbin/ppp/main.c
@@ -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]);
OpenPOWER on IntegriCloud