diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/host_io.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/host_io.zig b/src/host_io.zig index c8c537b9..8cbdd2d4 100644 --- a/src/host_io.zig +++ b/src/host_io.zig @@ -1605,6 +1605,10 @@ pub fn ttyTaken(shell_pid: libc.pid_t, master_fd: c_int) bool { const exe = procExe(node.pid, &probe.exe) orelse { if (offTty(node.pid, &probe.blob)) continue; + // Exiting (its exe gone, not a zombie yet), or not ours + // to read: outside the foreground group it holds + // nothing, as a killed background job does for a moment. + if (pgrp) |g| if (g != fg) continue; return true; }; if (!std.mem.eql(u8, exe, self_exe)) { |
