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:
2 files changed
+3
-2
No files matched your search
+2
-1
@@ -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]
|
||||
|
||||
Reference in new issue
Block a user