Lines Matching defs:options
89 int options;
106 options = 0;
109 options = WNOHANG;
113 pid = waitpid(process->pid, &status, options);
162 * Used for initializing stdio streams like options.stdin_stream. Returns
256 static void uv__process_child_init(const uv_process_options_t* options,
286 if (options->flags & UV_PROCESS_DETACHED)
351 if (options->cwd != NULL && chdir(options->cwd))
354 if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) {
365 if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid))
368 if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid))
371 if (options->env != NULL)
372 environ = options->env;
380 execvpe(options->file, options->args, environ);
382 execvp(options->file, options->args);
442 const uv_process_options_t* options) {
453 if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) {
476 if (options->flags & UV_PROCESS_DETACHED) {
514 const uv_process_options_t* options,
529 if (options->cwd != NULL) {
535 err = posix_spawn_fncs->file_actions.addchdir_np(actions, options->cwd);
648 static int uv__spawn_resolve_and_spawn(const uv_process_options_t* options,
665 if (options->file == NULL)
669 * by options->env */
671 if (options->env != NULL)
672 env = options->env;
674 /* If options->file contains a slash, posix_spawn/posix_spawnp should behave
678 if (strchr(options->file, '/') != NULL) {
680 err = posix_spawn(pid, options->file, actions, attrs, options->args, env);
697 k = strnlen(options->file, NAME_MAX + 1);
718 memcpy(b + (z - p) + (z > p), options->file, k + 1);
724 err = posix_spawn(pid, b, actions, attrs, options->args, env);
749 const uv_process_options_t* options,
758 err = uv__spawn_set_posix_spawn_attrs(&attrs, posix_spawn_fncs, options);
765 options,
773 /* Try to spawn options->file resolving in the provided environment
775 err = uv__spawn_resolve_and_spawn(options, &attrs, &actions, pid);
789 static int uv__spawn_and_init_child_fork(const uv_process_options_t* options,
815 uv__process_child_init(options, stdio_count, pipes, error_fd);
832 const uv_process_options_t* options,
858 err = uv__spawn_and_init_child_posix_spawn(options,
899 err = uv__spawn_and_init_child_fork(options, stdio_count, pipes, signal_pipe[1], pid);
937 const uv_process_options_t* options) {
950 assert(options->file != NULL);
951 assert(!(options->flags & ~(UV_PROCESS_DETACHED |
963 stdio_count = options->stdio_count;
980 for (i = 0; i < options->stdio_count; i++) {
981 err = uv__process_init_stdio(options->stdio + i, pipes[i]);
991 exec_errorno = uv__spawn_and_init_child(loop, options, stdio_count, pipes, &pid);
1018 process->exit_cb = options->exit_cb;
1023 for (i = 0; i < options->stdio_count; i++) {
1024 err = uv__process_open_stream(options->stdio + i, pipes[i]);
1029 uv__process_close_stream(options->stdio + i);
1042 if (i < options->stdio_count)
1043 if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM))