pty: when its pty closes, a program that ignores SIGHUP reads EIO on Linux and EOF on macOS; the test reads the shell's own exit, which holds on both

This commit is contained in:
ZacharyZhang-NY committed 2026-10-15 00:42:30 -04:00
1 parent 0afac81542
commit 6523632ade
2 files changed
+3 -2

No files matched your search

+2 -1
View File
@@ -337,7 +337,8 @@ mod tests {
#[test]
fn a_program_that_ignores_sighup_ends_when_the_pty_closes() {
close_after_ready("trap '' HUP; printf READY; exec cat", "exit status: 0");
// cat reads EOF on macOS and EIO on Linux; the shell's own exit holds on both.
close_after_ready("trap '' HUP; printf READY; cat; exit 7", "exit status: 7");
}
#[test]