You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- revert #9614 because `Command::exec()` resets the default signal handler for SIGPIPE, interfering with the option `--ignore-signal=PIPE`
- add regression-test for --ignore-signal=PIPE
- add FIXME comment about execvp()
Signed-off-by: Etienne Cordonnier <[email protected]>
// Verify the --ignore-signal=PIPE flag changes the behavior
2020
+
assert!(
2021
+
ignore_signal_exit_code != 141,
2022
+
"--ignore-signal=PIPE had no effect! Process was still killed by SIGPIPE (exit code 141). Normal: {normal_exit_code}, --ignore-signal: {ignore_signal_exit_code}"
2023
+
);
2024
+
2025
+
// Expected behavior:
2026
+
assert_eq!(
2027
+
normal_exit_code,141,
2028
+
"Without --ignore-signal, process should be killed by SIGPIPE"
2029
+
);
2030
+
assert_ne!(
2031
+
ignore_signal_exit_code,141,
2032
+
"With --ignore-signal=PIPE, process should NOT be killed by SIGPIPE"
2033
+
);
2034
+
2035
+
// Process should exit gracefully when SIGPIPE is ignored
0 commit comments