Skip to content

Commit ce5e4ce

Browse files
neonichuaciidgh
authored andcommitted
Fix signal if no process group is being used
1 parent db85546 commit ce5e4ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/Basic/Process.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ public final class Process: ObjectIdentifierProtocol {
430430
/// Note: This will signal all processes in the process group.
431431
public func signal(_ signal: Int32) {
432432
assert(launched, "The process is not yet launched.")
433-
_ = SPMLibc.kill(-processID, signal)
433+
_ = SPMLibc.kill(startNewProcessGroup ? -processID : processID, signal)
434434
}
435435
}
436436

0 commit comments

Comments
 (0)