diff options
author | 2001-10-01 19:19:09 +0000 | |
---|---|---|
committer | 2001-10-01 19:19:09 +0000 | |
commit | 11cd3c9f8f92ad6db09c94c55d0600f8a51827b4 (patch) | |
tree | 3325d5cc843a8c641169b08a68b9baa72b9bde7e | |
parent | Clean up example rule set. Use \ to wrap lines, use macro for interface name, (diff) | |
download | wireguard-openbsd-11cd3c9f8f92ad6db09c94c55d0600f8a51827b4.tar.xz wireguard-openbsd-11cd3c9f8f92ad6db09c94c55d0600f8a51827b4.zip |
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) { |