summaryrefslogtreecommitdiff
path: root/usr.bin/cu
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2012-07-10 09:32:41 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2012-07-10 09:32:41 +0000
commit0756d4d935de5b23e5c194bc3599924bc2adb0e0 (patch)
tree65cdb1d5ffcaf638a440b8bc9cd43379230737bb /usr.bin/cu
parenteb50f111d17dd243db0c23842b81a09ce49f6b05 (diff)
closefrom(STDERR_FILENO + 1) not STDOUT_FILENO so that output actually appears ;-).
Diffstat (limited to 'usr.bin/cu')
-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);