mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
fish: use compound literal to reset SIGPIPE handler
Signed-off-by: Susant Sahani <ssahani@redhat.com>
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user