Mercurial > emacs
comparison src/process.c @ 62334:f9dc4e8a41fe
(send_process_trap): Unblock SIGPIPE.
(send_process): Reset SIGPIPE handler before reporting error.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sat, 14 May 2005 14:06:33 +0000 |
| parents | d1daa8bf79fd |
| children | 7f6a053bbca4 8b66fddd72c5 f042e7c0fe20 |
comparison
equal
deleted
inserted
replaced
| 62333:80f8fd5fdea6 | 62334:f9dc4e8a41fe |
|---|---|
| 5106 SIGNAL_THREAD_CHECK (SIGPIPE); | 5106 SIGNAL_THREAD_CHECK (SIGPIPE); |
| 5107 #ifdef BSD4_1 | 5107 #ifdef BSD4_1 |
| 5108 sigrelse (SIGPIPE); | 5108 sigrelse (SIGPIPE); |
| 5109 sigrelse (SIGALRM); | 5109 sigrelse (SIGALRM); |
| 5110 #endif /* BSD4_1 */ | 5110 #endif /* BSD4_1 */ |
| 5111 sigunblock (sigmask (SIGPIPE)); | |
| 5111 longjmp (send_process_frame, 1); | 5112 longjmp (send_process_frame, 1); |
| 5112 } | 5113 } |
| 5113 | 5114 |
| 5114 /* Send some data to process PROC. | 5115 /* Send some data to process PROC. |
| 5115 BUF is the beginning of the data; LEN is the number of characters. | 5116 BUF is the beginning of the data; LEN is the number of characters. |
| 5297 { | 5298 { |
| 5298 rv = sendto (outfd, (char *) buf, this, | 5299 rv = sendto (outfd, (char *) buf, this, |
| 5299 0, datagram_address[outfd].sa, | 5300 0, datagram_address[outfd].sa, |
| 5300 datagram_address[outfd].len); | 5301 datagram_address[outfd].len); |
| 5301 if (rv < 0 && errno == EMSGSIZE) | 5302 if (rv < 0 && errno == EMSGSIZE) |
| 5302 report_file_error ("sending datagram", Fcons (proc, Qnil)); | 5303 { |
| 5304 signal (SIGPIPE, old_sigpipe); | |
| 5305 report_file_error ("sending datagram", | |
| 5306 Fcons (proc, Qnil)); | |
| 5307 } | |
| 5303 } | 5308 } |
| 5304 else | 5309 else |
| 5305 #endif | 5310 #endif |
| 5306 { | 5311 { |
| 5307 rv = emacs_write (outfd, (char *) buf, this); | 5312 rv = emacs_write (outfd, (char *) buf, this); |
