mirror of
https://github.com/clearlinux/uwsgi.git
synced 2026-10-04 07:58:33 +00:00
--close-on-exec option
This commit is contained in:
@@ -436,6 +436,10 @@ int wsgi_req_accept(struct wsgi_request *wsgi_req) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (uwsgi.close_on_exec) {
|
||||
fcntl(wsgi_req->poll.fd, F_SETFD, FD_CLOEXEC);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,6 +166,7 @@ static struct option long_options[] = {
|
||||
{"http-var", required_argument, 0, LONG_ARGS_HTTP_VAR},
|
||||
#endif
|
||||
{"catch-exceptions", no_argument, &uwsgi.catch_exceptions, 1},
|
||||
{"close-on-exec", no_argument, &uwsgi.close_on_exec, 1},
|
||||
{"mode", required_argument, 0, LONG_ARGS_MODE},
|
||||
{"env", required_argument, 0, LONG_ARGS_ENV},
|
||||
{"vacuum", no_argument, &uwsgi.vacuum, 1},
|
||||
|
||||
Reference in New Issue
Block a user