Lines Matching refs:err

82   int err;  in uv__process_init()  local
84 err = uv_signal_init(loop, &loop->child_watcher); in uv__process_init()
85 if (err) in uv__process_init()
86 return err; in uv__process_init()
228 int err; in uv__process_open_stream() local
233 err = uv__close(pipefds[1]); in uv__process_open_stream()
234 if (err != 0) in uv__process_open_stream()
460 int err; in uv__spawn_set_posix_spawn_attrs() local
464 err = posix_spawnattr_init(attrs); in uv__spawn_set_posix_spawn_attrs()
465 if (err != 0) { in uv__spawn_set_posix_spawn_attrs()
467 return err; in uv__spawn_set_posix_spawn_attrs()
475 err = ENOSYS; in uv__spawn_set_posix_spawn_attrs()
498 err = ENOSYS; in uv__spawn_set_posix_spawn_attrs()
504 err = posix_spawnattr_setflags(attrs, flags); in uv__spawn_set_posix_spawn_attrs()
505 if (err != 0) in uv__spawn_set_posix_spawn_attrs()
510 err = posix_spawnattr_setsigdefault(attrs, &signal_set); in uv__spawn_set_posix_spawn_attrs()
511 if (err != 0) in uv__spawn_set_posix_spawn_attrs()
516 err = posix_spawnattr_setsigmask(attrs, &signal_set); in uv__spawn_set_posix_spawn_attrs()
517 if (err != 0) in uv__spawn_set_posix_spawn_attrs()
520 return err; in uv__spawn_set_posix_spawn_attrs()
524 return err; in uv__spawn_set_posix_spawn_attrs()
537 int err; in uv__spawn_set_posix_spawn_file_actions() local
539 err = posix_spawn_file_actions_init(actions); in uv__spawn_set_posix_spawn_file_actions()
540 if (err != 0) { in uv__spawn_set_posix_spawn_file_actions()
542 return err; in uv__spawn_set_posix_spawn_file_actions()
548 err = ENOSYS; 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()
553 if (err != 0) in uv__spawn_set_posix_spawn_file_actions()
577 err = posix_spawn_file_actions_adddup2( in uv__spawn_set_posix_spawn_file_actions()
581 assert(err != ENOSYS); in uv__spawn_set_posix_spawn_file_actions()
582 if (err != 0) in uv__spawn_set_posix_spawn_file_actions()
595 err = posix_spawn_file_actions_addopen( in uv__spawn_set_posix_spawn_file_actions()
601 assert(err != ENOSYS); in uv__spawn_set_posix_spawn_file_actions()
602 if (err != 0) in uv__spawn_set_posix_spawn_file_actions()
609 err = posix_spawn_file_actions_addinherit_np(actions, fd); in uv__spawn_set_posix_spawn_file_actions()
611 err = posix_spawn_file_actions_adddup2(actions, use_fd, fd); in uv__spawn_set_posix_spawn_file_actions()
612 assert(err != ENOSYS); in uv__spawn_set_posix_spawn_file_actions()
613 if (err != 0) in uv__spawn_set_posix_spawn_file_actions()
635 err = posix_spawn_file_actions_addclose(actions, use_fd); in uv__spawn_set_posix_spawn_file_actions()
636 assert(err != ENOSYS); in uv__spawn_set_posix_spawn_file_actions()
637 if (err != 0) in uv__spawn_set_posix_spawn_file_actions()
645 return err; in uv__spawn_set_posix_spawn_file_actions()
674 int err; in uv__spawn_resolve_and_spawn() local
678 err = -1; in uv__spawn_resolve_and_spawn()
697 err = posix_spawn(pid, options->file, actions, attrs, options->args, env); in uv__spawn_resolve_and_spawn()
698 while (err == EINTR); in uv__spawn_resolve_and_spawn()
699 return err; in uv__spawn_resolve_and_spawn()
741 err = posix_spawn(pid, b, actions, attrs, options->args, env); in uv__spawn_resolve_and_spawn()
742 while (err == EINTR); in uv__spawn_resolve_and_spawn()
744 switch (err) { in uv__spawn_resolve_and_spawn()
752 return err; in uv__spawn_resolve_and_spawn()
761 return err; in uv__spawn_resolve_and_spawn()
771 int err; in uv__spawn_and_init_child_posix_spawn() local
775 err = uv__spawn_set_posix_spawn_attrs(&attrs, posix_spawn_fncs, options); in uv__spawn_and_init_child_posix_spawn()
776 if (err != 0) in uv__spawn_and_init_child_posix_spawn()
780 err = uv__spawn_set_posix_spawn_file_actions(&actions, in uv__spawn_and_init_child_posix_spawn()
785 if (err != 0) { 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()
793 assert(err != ENOSYS); in uv__spawn_and_init_child_posix_spawn()
802 return UV__ERR(err); in uv__spawn_and_init_child_posix_spawn()
855 int err; in uv__spawn_and_init_child() local
875 err = uv__spawn_and_init_child_posix_spawn(options, in uv__spawn_and_init_child()
884 if (err != UV_ENOSYS) in uv__spawn_and_init_child()
885 return err; in uv__spawn_and_init_child()
909 err = uv__make_pipe(signal_pipe, 0); in uv__spawn_and_init_child()
910 if (err) in uv__spawn_and_init_child()
911 return err; 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()
923 if (err == 0) { in uv__spawn_and_init_child()
932 err = waitpid(*pid, &status, 0); /* okay, read errorno */ in uv__spawn_and_init_child()
933 while (err == -1 && errno == EINTR); in uv__spawn_and_init_child()
934 assert(err == *pid); in uv__spawn_and_init_child()
935 err = exec_errorno; in uv__spawn_and_init_child()
939 err = waitpid(*pid, &status, 0); /* okay, got EPIPE */ in uv__spawn_and_init_child()
940 while (err == -1 && errno == EINTR); in uv__spawn_and_init_child()
941 assert(err == *pid); in uv__spawn_and_init_child()
942 err = UV_EPIPE; in uv__spawn_and_init_child()
949 return err; in uv__spawn_and_init_child()
964 int err; in uv_spawn()
986 err = UV_ENOMEM; in uv_spawn()
1000 err = uv__process_init_stdio(options->stdio + i, pipes[i]); in uv_spawn()
1001 if (err) in uv_spawn()
1047 err = uv__process_open_stream(options->stdio + i, pipes[i]); in uv_spawn()
1048 if (err == 0) in uv_spawn()
1078 return err; in uv_spawn()