pty: deinit should close child end

This commit is contained in:
Mitchell Hashimoto
2023-03-18 19:15:29 -07:00
parent 679f07605e
commit 872c1211f5
2 changed files with 1 additions and 3 deletions

View File

@ -80,6 +80,7 @@ pub fn open(size: winsize) !Pty {
pub fn deinit(self: *Pty) void {
_ = std.os.system.close(self.master);
_ = std.os.system.close(self.slave);
self.* = undefined;
}

View File

@ -185,9 +185,6 @@ pub fn threadExit(self: *Exec, data: ThreadData) void {
if (data.ev.process_exited) self.subprocess.externalExit();
self.subprocess.stop();
// Wait for our subprocess to report it exited.
// data.ev.loop.run(.once);
// Wait for our reader thread to end
data.read_thread.join();
}