Mercurial > emacs
comparison src/process.c @ 62581:7f6a053bbca4
(send_process): Restore the SIGPIPE handler if we catch a SIGPIPE.
| author | Eli Zaretskii <eliz@gnu.org> |
|---|---|
| date | Sat, 21 May 2005 11:58:49 +0000 |
| parents | f9dc4e8a41fe |
| children | b406e215e78f |
comparison
equal
deleted
inserted
replaced
| 62580:cc4bd3fe9a9d | 62581:7f6a053bbca4 |
|---|---|
| 5132 /* Use volatile to protect variables from being clobbered by longjmp. */ | 5132 /* Use volatile to protect variables from being clobbered by longjmp. */ |
| 5133 struct Lisp_Process *p = XPROCESS (proc); | 5133 struct Lisp_Process *p = XPROCESS (proc); |
| 5134 int rv; | 5134 int rv; |
| 5135 struct coding_system *coding; | 5135 struct coding_system *coding; |
| 5136 struct gcpro gcpro1; | 5136 struct gcpro gcpro1; |
| 5137 volatile SIGTYPE (*old_sigpipe)(); | |
| 5137 | 5138 |
| 5138 GCPRO1 (object); | 5139 GCPRO1 (object); |
| 5139 | 5140 |
| 5140 #ifdef VMS | 5141 #ifdef VMS |
| 5141 VMS_PROC_STUFF *vs, *get_vms_process_pointer(); | 5142 VMS_PROC_STUFF *vs, *get_vms_process_pointer(); |
| 5256 { | 5257 { |
| 5257 process_sent_to = proc; | 5258 process_sent_to = proc; |
| 5258 while (len > 0) | 5259 while (len > 0) |
| 5259 { | 5260 { |
| 5260 int this = len; | 5261 int this = len; |
| 5261 SIGTYPE (*old_sigpipe)(); | |
| 5262 | 5262 |
| 5263 /* Decide how much data we can send in one batch. | 5263 /* Decide how much data we can send in one batch. |
| 5264 Long lines need to be split into multiple batches. */ | 5264 Long lines need to be split into multiple batches. */ |
| 5265 if (!NILP (p->pty_flag)) | 5265 if (!NILP (p->pty_flag)) |
| 5266 { | 5266 { |
| 5399 } | 5399 } |
| 5400 } | 5400 } |
| 5401 #endif /* not VMS */ | 5401 #endif /* not VMS */ |
| 5402 else | 5402 else |
| 5403 { | 5403 { |
| 5404 signal (SIGPIPE, old_sigpipe); | |
| 5404 #ifndef VMS | 5405 #ifndef VMS |
| 5405 proc = process_sent_to; | 5406 proc = process_sent_to; |
| 5406 p = XPROCESS (proc); | 5407 p = XPROCESS (proc); |
| 5407 #endif | 5408 #endif |
| 5408 p->raw_status_low = Qnil; | 5409 p->raw_status_low = Qnil; |
