diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2017-09-10 15:28:51 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2017-09-10 16:24:34 -0400 |
commit | 9030cfaecf07fc2426b01f6f3a1df442ccdd3ebb (patch) | |
tree | 953b0a4c4e8b7a7ac79adb67f0d5c2111d895c5d /src/plugin.h | |
parent | 26dce93086ba46a3d9ead391b33b8a02515416ae (diff) | |
download | lighttpd-git-9030cfaecf07fc2426b01f6f3a1df442ccdd3ebb.tar.gz |
[core] SIGCHLD handle_waitpid hook for modules
centralize most waitpid() handling in core server, with hooks for
modules to be informed of pid and status when a process exits.
This enables faster discovery (and restart) of exited processes,
and also allows for lighttpd to manage backend processes in the
parent (master) process when server.max-worker > 0.
Diffstat (limited to 'src/plugin.h')
-rw-r--r-- | src/plugin.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugin.h b/src/plugin.h index 3dbe2bec..5e02950a 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -37,7 +37,8 @@ typedef struct { handler_t (* cleanup) (server *srv, void *p_d); /* is called ... */ handler_t (* handle_trigger) (server *srv, void *p_d); /* once a second */ - handler_t (* handle_sighup) (server *srv, void *p_d); /* at a signup */ + handler_t (* handle_sighup) (server *srv, void *p_d); /* at a sighup */ + handler_t (* handle_waitpid) (server *srv, void *p_d, pid_t pid, int status); /* upon a child process exit */ handler_t (* handle_uri_raw) (server *srv, connection *con, void *p_d); /* after uri_raw is set */ handler_t (* handle_uri_clean) (server *srv, connection *con, void *p_d); /* after uri is set */ @@ -84,6 +85,7 @@ handler_t plugins_call_connection_reset(server *srv, connection *con); handler_t plugins_call_handle_trigger(server *srv); handler_t plugins_call_handle_sighup(server *srv); +handler_t plugins_call_handle_waitpid(server *srv, pid_t pid, int status); handler_t plugins_call_init(server *srv); handler_t plugins_call_set_defaults(server *srv); |