diff options
| author | Unbit <info@unbit.it> | 2014-05-05 16:30:13 +0200 |
|---|---|---|
| committer | Unbit <info@unbit.it> | 2014-05-05 16:30:13 +0200 |
| commit | fe82772c377e1c0bdb1ce724f8bbe8ceb6294ee1 (patch) | |
| tree | 1cd6cda00c38ead826f0fbc5d59c9dfc67e64237 /core/fork_server.c | |
| parent | 9d98b3b4ef91457b63732ad065a128f10255616e (diff) | |
| download | uwsgi-fe82772c377e1c0bdb1ce724f8bbe8ceb6294ee1.tar.gz | |
add some comment to the fork server system
Diffstat (limited to 'core/fork_server.c')
| -rw-r--r-- | core/fork_server.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/core/fork_server.c b/core/fork_server.c index 2ba5b908..c6547ead 100644 --- a/core/fork_server.c +++ b/core/fork_server.c @@ -2,6 +2,18 @@ extern struct uwsgi_server uwsgi; +/* + +on connection retrieve the uid,gid and pid of the connecting process, in addition to up to 3 +file descriptors (emperor pipe, emperor pipe_config, on_demand socket dup()'ed to 0) + +if authorized, double fork, get the pid of the second child and exit() +its parent (this will force the Emperor to became its subreaper). + +from now on, we can consider the new child as a full-featured vassal + +*/ + void uwsgi_fork_server(char *socket) { int fd = bind_to_unix(socket, uwsgi.listen_queue, uwsgi.chmod_socket, uwsgi.abstract_socket); if (fd < 0) exit(1); |
