From f14416c0a8e3686d7b7d3bc3de9a450b8e8e6abd Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Mon, 1 Oct 2001 19:19:10 +0000 Subject: In "r" mode always dup2(STDOUT_FILENO, STDERR_FILENO); from ftpd/popen.c Otherwise, sendmail may complain about the lack of stderr. --- usr.sbin/cron/popen.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin/cron') 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) { -- cgit v1.2.3