This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
sigpipe_die (void)
{
error (exit_failure, 0, "%s",
sigpipe_die (void)
{
error (exit_failure, 0, "%s",
sigemptyset (&action.sa_mask);
if (sigaction (SIGPIPE, &action, NULL) >= 0)
{
sigemptyset (&action.sa_mask);
if (sigaction (SIGPIPE, &action, NULL) >= 0)
{
- /* Unblock the signal (just in case). This is needed because if the
- signal was blocked in the parent process, it is also blocked in
- this process: the mask of blocked signals is inherited across
- fork/exec (except for SIGCHLD). */
- sigset_t sigpipe_set;
-
- sigemptyset (&sigpipe_set);
- sigaddset (&sigpipe_set, SIGPIPE);
- sigprocmask (SIG_UNBLOCK, &sigpipe_set, NULL);
+ /* Unblock the signal (just in case). This is needed because if the
+ signal was blocked in the parent process, it is also blocked in
+ this process: the mask of blocked signals is inherited across
+ fork/exec (except for SIGCHLD). */
+ sigset_t sigpipe_set;
+
+ sigemptyset (&sigpipe_set);
+ sigaddset (&sigpipe_set, SIGPIPE);
+ sigprocmask (SIG_UNBLOCK, &sigpipe_set, NULL);