Lines Matching defs:options
104 uv_process_options_t* options) {
111 options->stdio = new uv_stdio_container_t[len];
112 options->stdio_count = len;
121 options->stdio[i].flags = UV_IGNORE;
123 options->stdio[i].flags = static_cast<uv_stdio_flags>(
125 options->stdio[i].data.stream = StreamForWrap(env, stdio);
127 options->stdio[i].flags = static_cast<uv_stdio_flags>(
130 options->stdio[i].data.stream = StreamForWrap(env, stdio);
132 options->stdio[i].flags = UV_INHERIT_STREAM;
133 options->stdio[i].data.stream = StreamForWrap(env, stdio);
139 options->stdio[i].flags = UV_INHERIT_FD;
140 options->stdio[i].data.fd = fd;
154 uv_process_options_t options;
155 memset(&options, 0, sizeof(uv_process_options_t));
157 options.exit_cb = OnExit;
159 // options.uid
165 options.flags |= UV_PROCESS_SETUID;
166 options.uid = static_cast<uv_uid_t>(uid);
169 // options.gid
175 options.flags |= UV_PROCESS_SETGID;
176 options.gid = static_cast<uv_gid_t>(gid);
181 // options.file
186 options.file = *file;
188 // options.args
197 options.args = new char*[argc + 1];
201 options.args[i] = strdup(*arg);
202 CHECK_NOT_NULL(options.args[i]);
204 options.args[argc] = nullptr;
207 // options.cwd
213 options.cwd = *cwd;
216 // options.env
223 options.env = new char*[envc + 1]; // Heap allocated to detect errors.
227 options.env[i] = strdup(*pair);
228 CHECK_NOT_NULL(options.env[i]);
230 options.env[envc] = nullptr;
233 // options.stdio
234 ParseStdioOptions(env, js_options, &options);
236 // options.windowsHide
241 options.flags |= UV_PROCESS_WINDOWS_HIDE;
245 options.flags |= UV_PROCESS_WINDOWS_HIDE_CONSOLE;
248 // options.windows_verbatim_arguments
254 options.flags |= UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS;
257 // options.detached
262 options.flags |= UV_PROCESS_DETACHED;
265 int err = uv_spawn(env->event_loop(), &wrap->process_, &options);
275 if (options.args) {
276 for (int i = 0; options.args[i]; i++) free(options.args[i]);
277 delete [] options.args;
280 if (options.env) {
281 for (int i = 0; options.env[i]; i++) free(options.env[i]);
282 delete [] options.env;
285 delete[] options.stdio;