std.process.kill should fail for a terminated pid · Issue #10587 · dlang/phobos (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@helmutg

Description

@helmutg

If passing a Pid with processID value set to Pid.terminated to kill, its value is interpreted as a process group id and the entire process group is being killed on Posix systems. A discussion on #10586 indicates that this behavior is not intentional. It is being proposed to change the behavior of kill to throw an exception when being passed a Pid instance with a negative processID. When doing so, the change in #10586 should be reverted as then, the kill function reliably throws the expected exception rather than failing only when the named process group happens to not exist.