1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

Used protocol/common.h in CGI

This commit is contained in:
witekfl 2006-01-18 18:11:29 +01:00 committed by
parent b8230326ce
commit 095e440270

View File

@ -26,6 +26,7 @@
#include "network/socket.h" #include "network/socket.h"
#include "osdep/osdep.h" #include "osdep/osdep.h"
#include "osdep/sysname.h" #include "osdep/sysname.h"
#include "protocol/common.h"
#include "protocol/file/cgi.h" #include "protocol/file/cgi.h"
#include "protocol/http/http.h" #include "protocol/http/http.h"
#include "protocol/uri.h" #include "protocol/uri.h"
@ -335,8 +336,6 @@ execute_cgi(struct connection *conn)
goto end0; goto end0;
} }
if (!pid) { /* CGI script */ if (!pid) { /* CGI script */
int i;
if (set_vars(conn, script)) { if (set_vars(conn, script)) {
_exit(1); _exit(1);
} }
@ -345,9 +344,7 @@ execute_cgi(struct connection *conn)
_exit(2); _exit(2);
} }
/* We implicitly chain stderr to ELinks' stderr. */ /* We implicitly chain stderr to ELinks' stderr. */
for (i = 3; i < 1024; i++) { close_all_non_term_fd();
close(i);
}
last_slash[-1] = 0; set_cwd(script); last_slash[-1] = '/'; last_slash[-1] = 0; set_cwd(script); last_slash[-1] = '/';
if (execl(script, script, NULL)) { if (execl(script, script, NULL)) {