| ... | @@ -60,6 +60,9 @@ pub const ChildProcess = struct { | ... | @@ -60,6 +60,9 @@ pub const ChildProcess = struct { |
| 60 | /// Darwin-only. Disable ASLR for the child process. | 60 | /// Darwin-only. Disable ASLR for the child process. |
| 61 | disable_aslr: bool = false, | 61 | disable_aslr: bool = false, |
| 62 | | 62 | |
| | 63 | /// Darwin-only. Start child process in suspended state as if SIGSTOP was sent. |
| | 64 | start_suspended: bool = false, |
| | 65 | |
| 63 | pub const Arg0Expand = os.Arg0Expand; | 66 | pub const Arg0Expand = os.Arg0Expand; |
| 64 | | 67 | |
| 65 | pub const SpawnError = error{ | 68 | pub const SpawnError = error{ |
| ... | @@ -578,6 +581,9 @@ pub const ChildProcess = struct { | ... | @@ -578,6 +581,9 @@ pub const ChildProcess = struct { |
| 578 | if (self.disable_aslr) { | 581 | if (self.disable_aslr) { |
| 579 | flags |= os.darwin._POSIX_SPAWN_DISABLE_ASLR; | 582 | flags |= os.darwin._POSIX_SPAWN_DISABLE_ASLR; |
| 580 | } | 583 | } |
| | 584 | if (self.start_suspended) { |
| | 585 | flags |= os.darwin.POSIX_SPAWN_START_SUSPENDED; |
| | 586 | } |
| 581 | try attr.set(flags); | 587 | try attr.set(flags); |
| 582 | | 588 | |
| 583 | var actions = try os.posix_spawn.Actions.init(); | 589 | var actions = try os.posix_spawn.Actions.init(); |