summaryrefslogtreecommitdiffstats
path: root/usr.bin/cu/command.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2012-07-10 09:32:40 +0000
committernicm <nicm@openbsd.org>2012-07-10 09:32:40 +0000
commitd8a7f18718b4e37e6f9756e93ef0a40aa51636ce (patch)
treeb598208aaf7024f9d6cf350f46b2b9c813696911 /usr.bin/cu/command.c
parentAllow an implicit address family for af-to rules. If the address (diff)
downloadwireguard-openbsd-d8a7f18718b4e37e6f9756e93ef0a40aa51636ce.tar.xz
wireguard-openbsd-d8a7f18718b4e37e6f9756e93ef0a40aa51636ce.zip
closefrom(STDERR_FILENO + 1) not STDOUT_FILENO so that output actually appears ;-).
Diffstat (limited to 'usr.bin/cu/command.c')
-rw-r--r--usr.bin/cu/command.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/cu/command.c b/usr.bin/cu/command.c
index 7898d79c193..df115b24461 100644
--- a/usr.bin/cu/command.c
+++ b/usr.bin/cu/command.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: command.c,v 1.4 2012/07/10 09:10:04 nicm Exp $ */
+/* $OpenBSD: command.c,v 1.5 2012/07/10 09:32:40 nicm Exp $ */
/*
* Copyright (c) 2012 Nicholas Marriott <nicm@openbsd.org>
@@ -67,7 +67,7 @@ pipe_command(void)
if (dup2(line_fd, STDOUT_FILENO) == -1)
_exit(1);
- if (closefrom(STDOUT_FILENO + 1) != 0)
+ if (closefrom(STDERR_FILENO + 1) != 0)
_exit(1);
execl(_PATH_BSHELL, "sh", "-c", cmd, (void*)NULL);
@@ -115,7 +115,7 @@ connect_command(void)
if (dup2(line_fd, STDIN_FILENO) == -1)
_exit(1);
- if (closefrom(STDOUT_FILENO + 1) != 0)
+ if (closefrom(STDERR_FILENO + 1) != 0)
_exit(1);
execl(_PATH_BSHELL, "sh", "-c", cmd, (void*)NULL);