32b252e1ae4a4a6b94ad0749d6289ae9eb8a0ae9
[debian/gzip] / debian / patches / sigpipe.diff
1 diff --git a/gzip.c b/gzip.c
2 index 38e1373..0d9f499 100644
3 --- a/gzip.c
4 +++ b/gzip.c
5 @@ -223,7 +223,9 @@ static int handled_sig[] =
6  #ifdef SIGHUP
7      , SIGHUP
8  #endif
9 +#ifdef SIGPIPE
10      , SIGPIPE
11 +#endif
12  #ifdef SIGTERM
13      , SIGTERM
14  #endif
15 diff --git a/gzip.c b/gzip.c
16 index 0d9f499..5fc6ded 100644
17 --- a/gzip.c
18 +++ b/gzip.c
19 @@ -556,7 +556,11 @@ int main (int argc, char **argv)
20      ALLOC(ush, tab_prefix1, 1L<<(BITS-1));
21  #endif
22  
23 +#ifdef SIGPIPE
24      exiting_signal = quiet ? SIGPIPE : 0;
25 +#else
26 +    exiting_signal = 0;
27 +#endif
28      install_signal_handlers ();
29  
30      /* And get to work */