mirror of
https://github.com/rkd77/elinks.git
synced 2024-12-04 14:46:47 -05:00
Used protocol/common.h in CGI
This commit is contained in:
parent
2074c8ca88
commit
a191b4dc31
@ -13,6 +13,7 @@ SUBDIRS-$(CONFIG_URI_REWRITE) += rewrite
|
||||
SUBDIRS = auth file http
|
||||
|
||||
OBJS-$(CONFIG_DATA) += data.o
|
||||
OBJS-$(CONFIG_CGI) += common.o
|
||||
OBJS-$(CONFIG_FSP) += common.o
|
||||
OBJS-$(CONFIG_SMB) += common.o
|
||||
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "network/socket.h"
|
||||
#include "osdep/osdep.h"
|
||||
#include "osdep/sysname.h"
|
||||
#include "protocol/common.h"
|
||||
#include "protocol/file/cgi.h"
|
||||
#include "protocol/http/http.h"
|
||||
#include "protocol/uri.h"
|
||||
@ -335,8 +336,6 @@ execute_cgi(struct connection *conn)
|
||||
goto end0;
|
||||
}
|
||||
if (!pid) { /* CGI script */
|
||||
int i;
|
||||
|
||||
if (set_vars(conn, script)) {
|
||||
_exit(1);
|
||||
}
|
||||
@ -345,9 +344,7 @@ execute_cgi(struct connection *conn)
|
||||
_exit(2);
|
||||
}
|
||||
/* We implicitly chain stderr to ELinks' stderr. */
|
||||
for (i = 3; i < 1024; i++) {
|
||||
close(i);
|
||||
}
|
||||
close_all_non_term_fd();
|
||||
|
||||
last_slash[-1] = 0; set_cwd(script); last_slash[-1] = '/';
|
||||
if (execl(script, script, NULL)) {
|
||||
|
Loading…
Reference in New Issue
Block a user