diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:18:17 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-02-16 13:18:17 +0000 |
commit | 284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9 (patch) | |
tree | 3cfcea06c5a5c9e454edd39b58111ef38810882c /networking/httpd.c | |
parent | 069e347863fa46f684ab6bd7e48cefd8fa74b629 (diff) | |
download | busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.gz busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.tar.bz2 busybox-w32-284d0faed6a1ec2adcc4b7aea31ae3d05b3b70d9.zip |
random s/short/int/
add_cmd 1189 1190 +1
xconnect_ftpdata 118 117 -1
data_align 86 84 -2
process_files 2101 2096 -5
forkexec 1345 1334 -11
Diffstat (limited to 'networking/httpd.c')
-rw-r--r-- | networking/httpd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/networking/httpd.c b/networking/httpd.c index 779f070d9..1ac49e7a2 100644 --- a/networking/httpd.c +++ b/networking/httpd.c | |||
@@ -1409,10 +1409,11 @@ static void send_cgi_and_exit( | |||
1409 | /* Child process */ | 1409 | /* Child process */ |
1410 | xfunc_error_retval = 242; | 1410 | xfunc_error_retval = 242; |
1411 | 1411 | ||
1412 | /* NB: close _first_, then move fds! */ | ||
1413 | close(toCgi.wr); | ||
1414 | close(fromCgi.rd); | ||
1412 | xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */ | 1415 | xmove_fd(toCgi.rd, 0); /* replace stdin with the pipe */ |
1413 | xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */ | 1416 | xmove_fd(fromCgi.wr, 1); /* replace stdout with the pipe */ |
1414 | close(fromCgi.rd); | ||
1415 | close(toCgi.wr); | ||
1416 | /* User seeing stderr output can be a security problem. | 1417 | /* User seeing stderr output can be a security problem. |
1417 | * If CGI really wants that, it can always do dup itself. */ | 1418 | * If CGI really wants that, it can always do dup itself. */ |
1418 | /* dup2(1, 2); */ | 1419 | /* dup2(1, 2); */ |