From 5ab478f645d665752e3518b5fac7f57220aa2dc5 Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 4 Jul 2001 09:32:09 +0000 Subject: Make the last fix work properly on descriptors 1 and 2 (not just 0) --- usr.sbin/ppp/ppp/main.c | 4 ++-- 1 file 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 @@ -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]); -- cgit v1.2.3