Skip to content

Commit

Permalink
termio/exec: call wait on subprocess when it exits externally
Browse files Browse the repository at this point in the history
  • Loading branch information
goonzoid committed Jan 5, 2025
1 parent 13fab6a commit 5335d32
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/termio/Exec.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1199,6 +1199,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;
}

Expand Down

0 comments on commit 5335d32

Please sign in to comment.