diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 2001-10-01 19:19:10 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 2001-10-01 19:19:10 +0000 |
commit | f14416c0a8e3686d7b7d3bc3de9a450b8e8e6abd (patch) | |
tree | 696f3ab02d21002cff272e049d1139f4161c8542 | |
parent | baa13f6ce77aed35bc9b2c97747060e0acc8152f (diff) |
In "r" mode always dup2(STDOUT_FILENO, STDERR_FILENO); from ftpd/popen.c
Otherwise, sendmail may complain about the lack of stderr.
-rw-r--r-- | usr.sbin/cron/popen.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/cron/popen.c b/usr.sbin/cron/popen.c index 9fbed0d435a..bac4b39c765 100644 --- a/usr.sbin/cron/popen.c +++ b/usr.sbin/cron/popen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: popen.c,v 1.10 2001/06/03 01:30:04 millert Exp $ */ +/* $OpenBSD: popen.c,v 1.11 2001/10/01 19:19:09 millert Exp $ */ /* * Copyright (c) 1988, 1993, 1994 @@ -38,7 +38,7 @@ #if 0 static char sccsid[] = "@(#)popen.c 8.3 (Berkeley) 4/6/94"; #else -static char rcsid[] = "$OpenBSD: popen.c,v 1.10 2001/06/03 01:30:04 millert Exp $"; +static char rcsid[] = "$OpenBSD: popen.c,v 1.11 2001/10/01 19:19:09 millert Exp $"; #endif #endif /* not lint */ @@ -155,9 +155,9 @@ cron_popen(program, type, e) if (*type == 'r') { if (pdes[1] != STDOUT_FILENO) { dup2(pdes[1], STDOUT_FILENO); - dup2(pdes[1], STDERR_FILENO); /* stderr too! */ (void)close(pdes[1]); } + dup2(STDOUT_FILENO, STDERR_FILENO); /* stderr too! */ (void)close(pdes[0]); } else { if (pdes[0] != STDIN_FILENO) { |