diff options
author | Paul Smith <psmith@gnu.org> | 2022-11-06 15:22:02 -0500 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2022-11-13 10:39:48 -0500 |
commit | 92ab2e642d2c04b3dcb5a736ae6193680bfd5f74 (patch) | |
tree | 68145cd112aa12bd11e4f904994b85db00f13694 /src | |
parent | deb4ff272a589d74950e120b800a35e212261f75 (diff) | |
download | make-git-92ab2e642d2c04b3dcb5a736ae6193680bfd5f74.tar.gz |
* src/main.c (main): [SV 63307] Handle SIGPIPE as a fatal signal
Always ignoring SIGPIPE is visible to child processes.
Diffstat (limited to 'src')
-rw-r--r-- | src/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1182,11 +1182,6 @@ main (int argc, char **argv, char **envp) /* Useful for attaching debuggers, etc. */ SPIN ("main-entry"); - /* Don't die if our stdout sends us SIGPIPE. */ -#ifdef SIGPIPE - bsd_signal (SIGPIPE, SIG_IGN); -#endif - #ifdef HAVE_ATEXIT if (ANY_SET (check_io_state (), IO_STDOUT_OK)) atexit (close_stdout); @@ -1265,6 +1260,9 @@ main (int argc, char **argv, char **envp) #ifdef SIGQUIT FATAL_SIG (SIGQUIT); #endif +#ifdef SIGPIPE + FATAL_SIG (SIGPIPE); +#endif FATAL_SIG (SIGINT); FATAL_SIG (SIGTERM); |