Mercurial > hg > xemacs-beta
comparison src/event-unixoid.c @ 185:3d6bfa290dbd r20-3b19
Import from CVS: tag r20-3b19
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:55:28 +0200 |
parents | 25f70ba0133c |
children | 727739f917cb |
comparison
equal
deleted
inserted
replaced
184:bcd2674570bf | 185:3d6bfa290dbd |
---|---|
250 { | 250 { |
251 perror ("XEmacs: can't open pipe"); | 251 perror ("XEmacs: can't open pipe"); |
252 exit (-1); | 252 exit (-1); |
253 } | 253 } |
254 signal_event_pipe_initialized = 1; | 254 signal_event_pipe_initialized = 1; |
255 | 255 |
256 /* Set it non-blocking so we can drain its output. */ | 256 /* Set it non-blocking so we can drain its output. */ |
257 set_descriptor_non_blocking (signal_event_pipe[0]); | 257 set_descriptor_non_blocking (signal_event_pipe[0]); |
258 | 258 |
259 /* Also set the write descriptor non-blocking so we don't | 259 /* Also set the write descriptor non-blocking so we don't |
260 hang in case a long time passes between times when | 260 hang in case a long time passes between times when |
261 we drain the pipe. */ | 261 we drain the pipe. */ |
262 set_descriptor_non_blocking (signal_event_pipe[1]); | 262 set_descriptor_non_blocking (signal_event_pipe[1]); |
263 | 263 |
264 /* WARNING: In order for the signal-event pipe to work correctly | 264 /* WARNING: In order for the signal-event pipe to work correctly |
265 and not cause lockups, the following need to be followed: | 265 and not cause lockups, the following need to be followed: |
266 | 266 |
267 1) event_pending_p() must ignore input on the signal-event pipe. | 267 1) event_pending_p() must ignore input on the signal-event pipe. |
268 2) As soon as next_event() notices input on the signal-event | 268 2) As soon as next_event() notices input on the signal-event |
269 pipe, it must drain it. */ | 269 pipe, it must drain it. */ |
270 FD_ZERO (&input_wait_mask); | 270 FD_ZERO (&input_wait_mask); |
271 FD_ZERO (&non_fake_input_wait_mask); | 271 FD_ZERO (&non_fake_input_wait_mask); |
272 FD_ZERO (&process_only_mask); | 272 FD_ZERO (&process_only_mask); |
273 FD_ZERO (&tty_only_mask); | 273 FD_ZERO (&tty_only_mask); |
274 | 274 |
275 FD_SET (signal_event_pipe[0], &input_wait_mask); | 275 FD_SET (signal_event_pipe[0], &input_wait_mask); |
276 } | 276 } |