diff options
author | Tiago Natel <t.nateldemoura@f5.com> | 2019-11-26 16:26:24 +0000 |
---|---|---|
committer | Tiago Natel <t.nateldemoura@f5.com> | 2019-11-26 16:26:24 +0000 |
commit | 417cc7be7c0c6f6e62f0916f671bbf0a4460226b (patch) | |
tree | 1ca53595fb350ab3d9acab11965bcc98606741f7 /src/nxt_process.h | |
parent | a3e5d095016166a78a45c9aade2b19d75d66833f (diff) | |
download | unit-417cc7be7c0c6f6e62f0916f671bbf0a4460226b.tar.gz unit-417cc7be7c0c6f6e62f0916f671bbf0a4460226b.tar.bz2 |
Refactor of process init.
Introduces the functions nxt_process_init_create() and
nxt_process_init_creds_set().
Diffstat (limited to '')
-rw-r--r-- | src/nxt_process.h | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/src/nxt_process.h b/src/nxt_process.h index d67573f1..3f247ae1 100644 --- a/src/nxt_process.h +++ b/src/nxt_process.h @@ -35,22 +35,21 @@ typedef nxt_int_t (*nxt_process_restart_t)(nxt_task_t *task, nxt_runtime_t *rt, nxt_process_init_t *init); struct nxt_process_init_s { - nxt_process_start_t start; - const char *name; - nxt_user_cred_t *user_cred; + nxt_mp_t *mem_pool; + nxt_process_start_t start; + const char *name; + nxt_user_cred_t *user_cred; - nxt_port_handlers_t *port_handlers; - const nxt_sig_event_t *signals; + const nxt_port_handlers_t *port_handlers; + const nxt_sig_event_t *signals; - nxt_process_type_t type; + nxt_process_type_t type; - void *data; - uint32_t stream; - - nxt_process_restart_t restart; + void *data; + uint32_t stream; union { - nxt_process_clone_t clone; + nxt_process_clone_t clone; } isolation; }; @@ -126,7 +125,6 @@ void nxt_process_connected_port_remove(nxt_process_t *process, nxt_port_t *nxt_process_connected_port_find(nxt_process_t *process, nxt_pid_t pid, nxt_port_id_t port_id); - void nxt_worker_process_quit_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg); @@ -155,8 +153,8 @@ NXT_EXPORT void nxt_process_title(nxt_task_t *task, const char *fmt, ...); #define nxt_abort() \ (void) raise(SIGABRT) -NXT_EXPORT nxt_int_t nxt_user_cred_get(nxt_task_t *task, nxt_user_cred_t *uc, - const char *group); +NXT_EXPORT nxt_int_t nxt_user_cred_get(nxt_task_t *task, nxt_mp_t *mp, + nxt_user_cred_t *uc, const char *group); NXT_EXPORT nxt_int_t nxt_user_cred_set(nxt_task_t *task, nxt_user_cred_t *uc); NXT_EXPORT extern nxt_pid_t nxt_pid; |