Lines Matching refs:options

106   int options;  in uv__wait_children()  local
123 options = 0; in uv__wait_children()
127 options = WNOHANG; in uv__wait_children()
131 pid = waitpid(process->pid, &status, options); in uv__wait_children()
274 static void uv__process_child_init(const uv_process_options_t* options, in uv__process_child_init() argument
304 if (options->flags & UV_PROCESS_DETACHED) in uv__process_child_init()
369 if (options->cwd != NULL && chdir(options->cwd)) in uv__process_child_init()
372 if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) { in uv__process_child_init()
383 if ((options->flags & UV_PROCESS_SETGID) && setgid(options->gid)) in uv__process_child_init()
386 if ((options->flags & UV_PROCESS_SETUID) && setuid(options->uid)) in uv__process_child_init()
389 if (options->env != NULL) in uv__process_child_init()
390 environ = options->env; in uv__process_child_init()
398 execvpe(options->file, options->args, environ); in uv__process_child_init()
400 execvp(options->file, options->args); in uv__process_child_init()
459 const uv_process_options_t* options) { in uv__spawn_set_posix_spawn_attrs() argument
470 if (options->flags & (UV_PROCESS_SETUID | UV_PROCESS_SETGID)) { in uv__spawn_set_posix_spawn_attrs()
493 if (options->flags & UV_PROCESS_DETACHED) { in uv__spawn_set_posix_spawn_attrs()
531 const uv_process_options_t* options, in uv__spawn_set_posix_spawn_file_actions() argument
546 if (options->cwd != NULL) { in uv__spawn_set_posix_spawn_file_actions()
552 err = posix_spawn_fncs->file_actions.addchdir_np(actions, options->cwd); in uv__spawn_set_posix_spawn_file_actions()
665 static int uv__spawn_resolve_and_spawn(const uv_process_options_t* options, in uv__spawn_resolve_and_spawn() argument
682 if (options->file == NULL) in uv__spawn_resolve_and_spawn()
688 if (options->env != NULL) in uv__spawn_resolve_and_spawn()
689 env = options->env; in uv__spawn_resolve_and_spawn()
695 if (strchr(options->file, '/') != NULL) { in uv__spawn_resolve_and_spawn()
697 err = posix_spawn(pid, options->file, actions, attrs, options->args, env); in uv__spawn_resolve_and_spawn()
714 k = strnlen(options->file, NAME_MAX + 1); in uv__spawn_resolve_and_spawn()
735 memcpy(b + (z - p) + (z > p), options->file, k + 1); in uv__spawn_resolve_and_spawn()
741 err = posix_spawn(pid, b, actions, attrs, options->args, env); in uv__spawn_resolve_and_spawn()
766 const uv_process_options_t* options, in uv__spawn_and_init_child_posix_spawn() argument
775 err = uv__spawn_set_posix_spawn_attrs(&attrs, posix_spawn_fncs, options); in uv__spawn_and_init_child_posix_spawn()
782 options, in uv__spawn_and_init_child_posix_spawn()
792 err = uv__spawn_resolve_and_spawn(options, &attrs, &actions, pid); in uv__spawn_and_init_child_posix_spawn()
806 static int uv__spawn_and_init_child_fork(const uv_process_options_t* options, in uv__spawn_and_init_child_fork() argument
832 uv__process_child_init(options, stdio_count, pipes, error_fd); in uv__spawn_and_init_child_fork()
849 const uv_process_options_t* options, in uv__spawn_and_init_child() argument
875 err = uv__spawn_and_init_child_posix_spawn(options, in uv__spawn_and_init_child()
916 err = uv__spawn_and_init_child_fork(options, stdio_count, pipes, signal_pipe[1], pid); in uv__spawn_and_init_child()
955 const uv_process_options_t* options) { in uv_spawn() argument
968 assert(options->file != NULL); in uv_spawn()
969 assert(!(options->flags & ~(UV_PROCESS_DETACHED | in uv_spawn()
982 stdio_count = options->stdio_count; in uv_spawn()
999 for (i = 0; i < options->stdio_count; i++) { in uv_spawn()
1000 err = uv__process_init_stdio(options->stdio + i, pipes[i]); in uv_spawn()
1010 exec_errorno = uv__spawn_and_init_child(loop, options, stdio_count, pipes, &pid); in uv_spawn()
1041 process->exit_cb = options->exit_cb; in uv_spawn()
1046 for (i = 0; i < options->stdio_count; i++) { in uv_spawn()
1047 err = uv__process_open_stream(options->stdio + i, pipes[i]); in uv_spawn()
1052 uv__process_close_stream(options->stdio + i); in uv_spawn()
1065 if (i < options->stdio_count) in uv_spawn()
1066 if (options->stdio[i].flags & (UV_INHERIT_FD | UV_INHERIT_STREAM)) in uv_spawn()