termio/exec: call wait on subprocess when it exits externally

This commit is contained in:
Will Pragnell
2025-01-04 22:37:43 -08:00
parent 949a1d157d
commit e8c922b67e

View File

@ -1203,6 +1203,10 @@ const Subprocess = struct {
/// Called to notify that we exited externally so we can unset our
/// running state.
pub fn externalExit(self: *Subprocess) void {
if (self.command) |*cmd| {
_ = cmd.wait(false) catch |err|
log.err("error waiting on subprocess: {}", .{err});
}
self.command = null;
}