| ... | @@ -125,7 +125,7 @@ static void populate_termination(Termination *term, int status) { | ... | @@ -125,7 +125,7 @@ static void populate_termination(Termination *term, int status) { |
| 125 | static void os_spawn_process_posix(const char *exe, ZigList<const char *> &args, Termination *term) { | 125 | static void os_spawn_process_posix(const char *exe, ZigList<const char *> &args, Termination *term) { |
| 126 | pid_t pid = fork(); | 126 | pid_t pid = fork(); |
| 127 | if (pid == -1) | 127 | if (pid == -1) |
| 128 | zig_panic("fork failed"); | 128 | zig_panic("fork failed: %s", strerror(errno)); |
| 129 | if (pid == 0) { | 129 | if (pid == 0) { |
| 130 | // child | 130 | // child |
| 131 | const char **argv = allocate<const char *>(args.length + 2); | 131 | const char **argv = allocate<const char *>(args.length + 2); |
| ... | @@ -839,9 +839,9 @@ static int os_exec_process_posix(const char *exe, ZigList<const char *> &args, | ... | @@ -839,9 +839,9 @@ static int os_exec_process_posix(const char *exe, ZigList<const char *> &args, |
| 839 | if ((err = pipe(stderr_pipe))) | 839 | if ((err = pipe(stderr_pipe))) |
| 840 | zig_panic("pipe failed"); | 840 | zig_panic("pipe failed"); |
| 841 | | 841 | |
| 842 | pid_t pid = fork(); | 842 | pid_t pid = vfork(); |
| 843 | if (pid == -1) | 843 | if (pid == -1) |
| 844 | zig_panic("fork failed"); | 844 | zig_panic("fork failed: %s", strerror(errno)); |
| 845 | if (pid == 0) { | 845 | if (pid == 0) { |
| 846 | // child | 846 | // child |
| 847 | if (dup2(stdin_pipe[0], STDIN_FILENO) == -1) | 847 | if (dup2(stdin_pipe[0], STDIN_FILENO) == -1) |