Function killPosix [src]
Prototype
pub fn killPosix(self: *ChildProcess) !Term
Parameters
self: *ChildProcess
Source
pub fn killPosix(self: *ChildProcess) !Term {
if (self.term) |term| {
self.cleanupStreams();
return term;
}
posix.kill(self.id, posix.SIG.TERM) catch |err| switch (err) {
error.ProcessNotFound => return error.AlreadyTerminated,
else => return err,
};
self.waitUnwrappedPosix();
return self.term.?;
}