Deleted Added
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_

--- 55 unchanged lines hidden (view full) ---

64
65typedef struct {
66 nxt_thread_mutex_t mutex;
67 uint32_t size;
68 uint32_t cap;
69 nxt_port_mmap_t *elts;
70} nxt_port_mmaps_t;
71
72
73typedef struct {
74 nxt_pid_t pid;
75 const char *name;
76 nxt_queue_t ports; /* of nxt_port_t */
77 nxt_process_state_t state;
78 nxt_bool_t registered;
79 nxt_int_t use_count;
80
81 nxt_port_mmaps_t incoming;
82 nxt_port_mmaps_t outgoing;
83
84 nxt_thread_mutex_t cp_mutex;
85 nxt_lvlhsh_t connected_ports; /* of nxt_port_t */
86
87 uint32_t stream;
88
89 nxt_mp_t *mem_pool;
90 nxt_credential_t *user_cred;
91
92 nxt_process_data_t data;
93
94 union {
95#if (NXT_HAVE_CLONE)
96 nxt_clone_t clone;
97#endif
98 } isolation;
99} nxt_process_t;
100
101
102typedef nxt_int_t (*nxt_process_prefork_t)(nxt_task_t *task,
103 nxt_process_t *process, nxt_mp_t *mp);
104typedef nxt_int_t (*nxt_process_postfork_t)(nxt_task_t *task,
105 nxt_process_t *process, nxt_mp_t *mp);
106typedef nxt_int_t (*nxt_process_setup_t)(nxt_task_t *task,

--- 72 unchanged lines hidden (view full) ---

179 nxt_str_t *user, nxt_str_t *group);
180nxt_int_t nxt_process_apply_creds(nxt_task_t *task, nxt_process_t *process);
181
182#if (NXT_HAVE_CLONE_NEWUSER)
183nxt_int_t nxt_process_vldt_isolation_creds(nxt_task_t *task,
184 nxt_process_t *process);
185#endif
186
187#if (NXT_HAVE_SETPROCTITLE)
188
189#define nxt_process_title(task, fmt, ...) \
190 setproctitle(fmt, __VA_ARGS__)
191
192#elif (NXT_LINUX || NXT_SOLARIS || NXT_MACOSX)
193
194#define NXT_SETPROCTITLE_ARGV 1

--- 26 unchanged lines hidden ---