Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix leaked zombie processes when closing surfaces #4605

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/config/Config.zig
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ const inputpkg = @import("../input.zig");
const terminal = @import("../terminal/main.zig");
const internal_os = @import("../os/main.zig");
const cli = @import("../cli.zig");
const Command = @import("../Command.zig");

const conditional = @import("conditional.zig");
const Conditional = conditional.Conditional;
Expand Down
8 changes: 6 additions & 2 deletions src/termio/Exec.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1196,9 +1196,13 @@ const Subprocess = struct {
try self.pty.?.childPreExec();
}

/// Called to notify that we exited externally so we can unset our
/// running state.
/// Called to notify that we exited externally so we can call wait on the
/// process and 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
1 change: 0 additions & 1 deletion src/termio/Options.zig
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const builtin = @import("builtin");
const xev = @import("xev");
const apprt = @import("../apprt.zig");
const renderer = @import("../renderer.zig");
const Command = @import("../Command.zig");
const Config = @import("../config.zig").Config;
const termio = @import("../termio.zig");

Expand Down
1 change: 0 additions & 1 deletion src/termio/backend.zig
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const renderer = @import("../renderer.zig");
const shell_integration = @import("shell_integration.zig");
const terminal = @import("../terminal/main.zig");
const termio = @import("../termio.zig");
const Command = @import("../Command.zig");
const Pty = @import("../pty.zig").Pty;

// The preallocation size for the write request pool. This should be big
Expand Down