projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dup stderr, so get error messages from ls
[unix-history]
/
usr
/
src
/
libexec
/
ftpd
/
popen.c
diff --git
a/usr/src/libexec/ftpd/popen.c
b/usr/src/libexec/ftpd/popen.c
index
061c950
..
841dcc6
100644
(file)
--- a/
usr/src/libexec/ftpd/popen.c
+++ b/
usr/src/libexec/ftpd/popen.c
@@
-21,7
+21,7
@@
*/
#ifndef lint
*/
#ifndef lint
-static char sccsid[] = "@(#)popen.c 5.
5
(Berkeley) %G%";
+static char sccsid[] = "@(#)popen.c 5.
6
(Berkeley) %G%";
#endif /* not lint */
#include <sys/types.h>
#endif /* not lint */
#include <sys/types.h>
@@
-90,6
+90,7
@@
ftpd_popen(program, type)
if (*type == 'r') {
if (pdes[1] != 1) {
dup2(pdes[1], 1);
if (*type == 'r') {
if (pdes[1] != 1) {
dup2(pdes[1], 1);
+ dup2(pdes[1], 2); /* stderr, too! */
(void)close(pdes[1]);
}
(void)close(pdes[0]);
(void)close(pdes[1]);
}
(void)close(pdes[0]);