Mercurial > hg > xemacs-beta
comparison src/process-unix.c @ 361:7347b34c275b r21-1-10
Import from CVS: tag r21-1-10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:58:40 +0200 |
parents | 19dcec799385 |
children | 30d2cfa1092a |
comparison
equal
deleted
inserted
replaced
360:0f00b38cfccb | 361:7347b34c275b |
---|---|
1151 /* Use volatile to protect variables from being clobbered by longjmp. */ | 1151 /* Use volatile to protect variables from being clobbered by longjmp. */ |
1152 SIGTYPE (*volatile old_sigpipe) (int) = 0; | 1152 SIGTYPE (*volatile old_sigpipe) (int) = 0; |
1153 volatile Lisp_Object vol_proc = proc; | 1153 volatile Lisp_Object vol_proc = proc; |
1154 struct Lisp_Process *volatile p = XPROCESS (proc); | 1154 struct Lisp_Process *volatile p = XPROCESS (proc); |
1155 | 1155 |
1156 /* #### JV: layering violation? | |
1157 | |
1158 This function knows too much about the relation between the encodingstream | |
1159 (DATA_OUTSTREAM) and te actual output stream p->output_stream. | |
1160 | |
1161 If encoding streams properly forwarded all calls, we could simply | |
1162 use DATA_OUTSTREAM everywhere. */ | |
1163 | |
1156 if (!SETJMP (send_process_frame)) | 1164 if (!SETJMP (send_process_frame)) |
1157 { | 1165 { |
1158 /* use a reasonable-sized buffer (somewhere around the size of the | 1166 /* use a reasonable-sized buffer (somewhere around the size of the |
1159 stream buffer) so as to avoid inundating the stream with blocked | 1167 stream buffer) so as to avoid inundating the stream with blocked |
1160 data. */ | 1168 data. */ |
1186 { | 1194 { |
1187 /* Buffer is full. Wait, accepting input; | 1195 /* Buffer is full. Wait, accepting input; |
1188 that may allow the program | 1196 that may allow the program |
1189 to finish doing output and read more. */ | 1197 to finish doing output and read more. */ |
1190 Faccept_process_output (Qnil, make_int (1), Qnil); | 1198 Faccept_process_output (Qnil, make_int (1), Qnil); |
1199 /* It could have *really* finished, deleting the process */ | |
1200 if (NILP(p->pipe_outstream)) | |
1201 return; | |
1191 old_sigpipe = | 1202 old_sigpipe = |
1192 (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); | 1203 (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); |
1193 Lstream_flush (XLSTREAM (p->pipe_outstream)); | 1204 Lstream_flush (XLSTREAM (p->pipe_outstream)); |
1194 signal (SIGPIPE, old_sigpipe); | 1205 signal (SIGPIPE, old_sigpipe); |
1195 } | 1206 } |