Deleted
Added
nxt_process.h (1254:aae6699f4eee) | nxt_process.h (1302:d4c6a91f7091) |
---|---|
1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#ifndef _NXT_PROCESS_H_INCLUDED_ 8#define _NXT_PROCESS_H_INCLUDED_ --- 21 unchanged lines hidden (view full) --- 30} nxt_process_clone_t; 31 32typedef struct nxt_process_init_s nxt_process_init_t; 33typedef nxt_int_t (*nxt_process_start_t)(nxt_task_t *task, void *data); 34typedef nxt_int_t (*nxt_process_restart_t)(nxt_task_t *task, nxt_runtime_t *rt, 35 nxt_process_init_t *init); 36 37struct nxt_process_init_s { | 1 2/* 3 * Copyright (C) Igor Sysoev 4 * Copyright (C) NGINX, Inc. 5 */ 6 7#ifndef _NXT_PROCESS_H_INCLUDED_ 8#define _NXT_PROCESS_H_INCLUDED_ --- 21 unchanged lines hidden (view full) --- 30} nxt_process_clone_t; 31 32typedef struct nxt_process_init_s nxt_process_init_t; 33typedef nxt_int_t (*nxt_process_start_t)(nxt_task_t *task, void *data); 34typedef nxt_int_t (*nxt_process_restart_t)(nxt_task_t *task, nxt_runtime_t *rt, 35 nxt_process_init_t *init); 36 37struct nxt_process_init_s { |
38 nxt_process_start_t start; 39 const char *name; 40 nxt_user_cred_t *user_cred; | 38 nxt_mp_t *mem_pool; 39 nxt_process_start_t start; 40 const char *name; 41 nxt_user_cred_t *user_cred; |
41 | 42 |
42 nxt_port_handlers_t *port_handlers; 43 const nxt_sig_event_t *signals; | 43 const nxt_port_handlers_t *port_handlers; 44 const nxt_sig_event_t *signals; |
44 | 45 |
45 nxt_process_type_t type; | 46 nxt_process_type_t type; |
46 | 47 |
47 void *data; 48 uint32_t stream; | 48 void *data; 49 uint32_t stream; |
49 | 50 |
50 nxt_process_restart_t restart; 51 | |
52 union { | 51 union { |
53 nxt_process_clone_t clone; | 52 nxt_process_clone_t clone; |
54 } isolation; 55}; 56 57 58typedef struct nxt_port_mmap_s nxt_port_mmap_t; 59typedef struct nxt_port_mmaps_s nxt_port_mmaps_t; 60 61struct nxt_port_mmaps_s { --- 59 unchanged lines hidden (view full) --- 121void nxt_process_connected_port_add(nxt_process_t *process, nxt_port_t *port); 122 123void nxt_process_connected_port_remove(nxt_process_t *process, 124 nxt_port_t *port); 125 126nxt_port_t *nxt_process_connected_port_find(nxt_process_t *process, 127 nxt_pid_t pid, nxt_port_id_t port_id); 128 | 53 } isolation; 54}; 55 56 57typedef struct nxt_port_mmap_s nxt_port_mmap_t; 58typedef struct nxt_port_mmaps_s nxt_port_mmaps_t; 59 60struct nxt_port_mmaps_s { --- 59 unchanged lines hidden (view full) --- 120void nxt_process_connected_port_add(nxt_process_t *process, nxt_port_t *port); 121 122void nxt_process_connected_port_remove(nxt_process_t *process, 123 nxt_port_t *port); 124 125nxt_port_t *nxt_process_connected_port_find(nxt_process_t *process, 126 nxt_pid_t pid, nxt_port_id_t port_id); 127 |
129 | |
130void nxt_worker_process_quit_handler(nxt_task_t *task, 131 nxt_port_recv_msg_t *msg); 132 133 134#if (NXT_HAVE_SETPROCTITLE) 135 136#define nxt_process_title(task, fmt, ...) \ 137 setproctitle(fmt, __VA_ARGS__) --- 12 unchanged lines hidden (view full) --- 150/* 151 * Solaris declares abort() as __NORETURN, 152 * raise(SIGABRT) is mostly the same. 153 */ 154 155#define nxt_abort() \ 156 (void) raise(SIGABRT) 157 | 128void nxt_worker_process_quit_handler(nxt_task_t *task, 129 nxt_port_recv_msg_t *msg); 130 131 132#if (NXT_HAVE_SETPROCTITLE) 133 134#define nxt_process_title(task, fmt, ...) \ 135 setproctitle(fmt, __VA_ARGS__) --- 12 unchanged lines hidden (view full) --- 148/* 149 * Solaris declares abort() as __NORETURN, 150 * raise(SIGABRT) is mostly the same. 151 */ 152 153#define nxt_abort() \ 154 (void) raise(SIGABRT) 155 |
158NXT_EXPORT nxt_int_t nxt_user_cred_get(nxt_task_t *task, nxt_user_cred_t *uc, 159 const char *group); | 156NXT_EXPORT nxt_int_t nxt_user_cred_get(nxt_task_t *task, nxt_mp_t *mp, 157 nxt_user_cred_t *uc, const char *group); |
160NXT_EXPORT nxt_int_t nxt_user_cred_set(nxt_task_t *task, nxt_user_cred_t *uc); 161 162NXT_EXPORT extern nxt_pid_t nxt_pid; 163NXT_EXPORT extern nxt_pid_t nxt_ppid; 164NXT_EXPORT extern char **nxt_process_argv; 165NXT_EXPORT extern char ***nxt_process_environ; 166 167 168#endif /* _NXT_PROCESS_H_INCLUDED_ */ | 158NXT_EXPORT nxt_int_t nxt_user_cred_set(nxt_task_t *task, nxt_user_cred_t *uc); 159 160NXT_EXPORT extern nxt_pid_t nxt_pid; 161NXT_EXPORT extern nxt_pid_t nxt_ppid; 162NXT_EXPORT extern char **nxt_process_argv; 163NXT_EXPORT extern char ***nxt_process_environ; 164 165 166#endif /* _NXT_PROCESS_H_INCLUDED_ */ |