fix: avoid sending stdin_close if subprocess is already dead
This commit is contained in:
parent
1ce0e4f709
commit
fbb5c8e200
1 changed files with 1 additions and 1 deletions
|
@ -48,7 +48,7 @@ pub fn send(self: *const Self, bytes_: []const u8) tp.result {
|
|||
pub fn close(self: *Self) tp.result {
|
||||
defer self.deinit();
|
||||
if (self.stdin_behavior == .Pipe)
|
||||
if (self.pid) |pid| try pid.send(.{"stdin_close"});
|
||||
if (self.pid) |pid| if (!pid.expired()) try pid.send(.{"stdin_close"});
|
||||
}
|
||||
|
||||
pub fn writer(self: *Self) Writer {
|
||||
|
|
Loading…
Add table
Reference in a new issue