| ... | ... | @@ -85,8 +85,8 @@ expand_arg0: Arg0Expand, |
| 85 | 85 | /// Darwin-only. Disable ASLR for the child process. |
| 86 | 86 | disable_aslr: bool = false, |
| 87 | 87 | |
| 88 | | /// Darwin and Windows only. Start child process in suspended state. For Darwin it's started |
| 89 | | /// as if SIGSTOP was sent. |
| 88 | /// Start child process in suspended state. |
| 89 | /// For Posix systems it's started as if SIGSTOP was sent. |
| 90 | 90 | start_suspended: bool = false, |
| 91 | 91 | |
| 92 | 92 | /// Windows-only. Sets the CREATE_NO_WINDOW flag in CreateProcess. |
| ... | ... | @@ -669,6 +669,10 @@ fn spawnPosix(self: *ChildProcess) SpawnError!void { |
| 669 | 669 | posix.setpgid(0, pid) catch |err| forkChildErrReport(err_pipe[1], err); |
| 670 | 670 | } |
| 671 | 671 | |
| 672 | if (self.start_suspended) { |
| 673 | posix.kill(posix.getpid(), .STOP) catch |err| forkChildErrReport(err_pipe[1], err); |
| 674 | } |
| 675 | |
| 672 | 676 | const err = switch (self.expand_arg0) { |
| 673 | 677 | .expand => posix.execvpeZ_expandArg0(.expand, argv_buf.ptr[0].?, argv_buf.ptr, envp), |
| 674 | 678 | .no_expand => posix.execvpeZ_expandArg0(.no_expand, argv_buf.ptr[0].?, argv_buf.ptr, envp), |