summaryrefslogtreecommitdiff
path: root/src/process.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2005-05-21 11:58:49 +0000
committerEli Zaretskii <eliz@gnu.org>2005-05-21 11:58:49 +0000
commit0ff692700bb0cb6f75e292c6817debe2ef65224e (patch)
tree42c92ae42c194032be803a52fe1374f96ec85486 /src/process.c
parent6f0de615c1fb07e988e88b405b7d60f7cf7edf93 (diff)
downloademacs-0ff692700bb0cb6f75e292c6817debe2ef65224e.tar.gz
(send_process): Restore the SIGPIPE handler if we catch a SIGPIPE.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/process.c b/src/process.c
index aad9e70731f..db7d9350821 100644
--- a/src/process.c
+++ b/src/process.c
@@ -5134,6 +5134,7 @@ send_process (proc, buf, len, object)
int rv;
struct coding_system *coding;
struct gcpro gcpro1;
+ volatile SIGTYPE (*old_sigpipe)();
GCPRO1 (object);
@@ -5258,7 +5259,6 @@ send_process (proc, buf, len, object)
while (len > 0)
{
int this = len;
- SIGTYPE (*old_sigpipe)();
/* Decide how much data we can send in one batch.
Long lines need to be split into multiple batches. */
@@ -5401,6 +5401,7 @@ send_process (proc, buf, len, object)
#endif /* not VMS */
else
{
+ signal (SIGPIPE, old_sigpipe);
#ifndef VMS
proc = process_sent_to;
p = XPROCESS (proc);