fish: use compound literal to reset SIGPIPE handler

Signed-off-by: Susant Sahani <ssahani@redhat.com>
This commit is contained in:
Susant Sahani
2025-11-19 18:39:44 +05:30
committed by rwmjones
parent bb4c105554
commit 7e5ace69bc

View File

@@ -41,9 +41,9 @@ run_man (const char *cmd, size_t argc, char *argv[])
/* We have to restore SIGPIPE to the default action around the
* external 'man' command to avoid the warning 'gzip: stdout: Broken pipe'.
*/
struct sigaction sa, old_sa;
memset (&sa, 0, sizeof sa);
sa.sa_handler = SIG_DFL;
struct sigaction sa = {
.sa_handler = SIG_DFL,
}, old_sa;
sigaction (SIGPIPE, &sa, &old_sa);
int r = system ("man 1 guestfish");