Mercurial > hg > xemacs-beta
comparison src/process-unix.c @ 406:b8cc9ab3f761 r21-2-33
Import from CVS: tag r21-2-33
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:17:09 +0200 |
parents | 2f8bb876ab1d |
children | de805c49cfc1 |
comparison
equal
deleted
inserted
replaced
405:0e08f63c74d2 | 406:b8cc9ab3f761 |
---|---|
1137 /* Use volatile to protect variables from being clobbered by longjmp. */ | 1137 /* Use volatile to protect variables from being clobbered by longjmp. */ |
1138 SIGTYPE (*volatile old_sigpipe) (int) = 0; | 1138 SIGTYPE (*volatile old_sigpipe) (int) = 0; |
1139 volatile Lisp_Object vol_proc = proc; | 1139 volatile Lisp_Object vol_proc = proc; |
1140 Lisp_Process *volatile p = XPROCESS (proc); | 1140 Lisp_Process *volatile p = XPROCESS (proc); |
1141 | 1141 |
1142 /* #### JV: layering violation? | |
1143 | |
1144 This function knows too much about the relation between the encodingstream | |
1145 (DATA_OUTSTREAM) and te actual output stream p->output_stream. | |
1146 | |
1147 If encoding streams properly forwarded all calls, we could simply | |
1148 use DATA_OUTSTREAM everywhere. */ | |
1149 | |
1142 if (!SETJMP (send_process_frame)) | 1150 if (!SETJMP (send_process_frame)) |
1143 { | 1151 { |
1144 /* use a reasonable-sized buffer (somewhere around the size of the | 1152 /* use a reasonable-sized buffer (somewhere around the size of the |
1145 stream buffer) so as to avoid inundating the stream with blocked | 1153 stream buffer) so as to avoid inundating the stream with blocked |
1146 data. */ | 1154 data. */ |
1171 { | 1179 { |
1172 /* Buffer is full. Wait, accepting input; | 1180 /* Buffer is full. Wait, accepting input; |
1173 that may allow the program | 1181 that may allow the program |
1174 to finish doing output and read more. */ | 1182 to finish doing output and read more. */ |
1175 Faccept_process_output (Qnil, make_int (1), Qnil); | 1183 Faccept_process_output (Qnil, make_int (1), Qnil); |
1184 /* It could have *really* finished, deleting the process */ | |
1185 if (NILP(p->pipe_outstream)) | |
1186 return; | |
1176 old_sigpipe = | 1187 old_sigpipe = |
1177 (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); | 1188 (SIGTYPE (*) (int)) signal (SIGPIPE, send_process_trap); |
1178 Lstream_flush (XLSTREAM (p->pipe_outstream)); | 1189 Lstream_flush (XLSTREAM (p->pipe_outstream)); |
1179 signal (SIGPIPE, old_sigpipe); | 1190 signal (SIGPIPE, old_sigpipe); |
1180 } | 1191 } |