Ensure that a valid PID is passed to kill().
This commit is contained in:
parent
01c2c26964
commit
5c3afcc175
|
@ -158,6 +158,9 @@ final class PosixEventDriverProcesses(Loop : PosixEventLoop) : EventDriverProces
|
|||
@trusted {
|
||||
import core.sys.posix.signal : pkill = kill;
|
||||
|
||||
assert(cast(int)pid > 0, "Invalid PID passed to kill.");
|
||||
|
||||
if (cast(int)pid > 0)
|
||||
pkill(cast(int)pid, signal);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue