Mercurial > hg > xemacs-beta
comparison src/signal.c @ 223:2c611d1463a6 r20-4b10
Import from CVS: tag r20-4b10
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:10:54 +0200 |
parents | 41ff10fd062f |
children | 677f6a0ee643 |
comparison
equal
deleted
inserted
replaced
222:aae4c8b01452 | 223:2c611d1463a6 |
---|---|
178 Do NOT set alarm_happened, because we don't want anyone | 178 Do NOT set alarm_happened, because we don't want anyone |
179 looking at the timeout queue. We didn't set it and | 179 looking at the timeout queue. We didn't set it and |
180 it needs to stay the way it is. */ | 180 it needs to stay the way it is. */ |
181 quit_check_signal_happened = 1; | 181 quit_check_signal_happened = 1; |
182 | 182 |
183 #ifdef _WIN32 | |
184 can_break_system_calls = 0; | |
185 #else | |
183 /* can_break_system_calls is set when we want to break out of | 186 /* can_break_system_calls is set when we want to break out of |
184 non-interruptible system calls. */ | 187 non-interruptible system calls. */ |
185 if (can_break_system_calls) | 188 if (can_break_system_calls) |
186 { | 189 { |
187 /* reset the flag for safety and such. Do this *before* | 190 /* reset the flag for safety and such. Do this *before* |
190 can_break_system_calls = 0; | 193 can_break_system_calls = 0; |
191 EMACS_UNBLOCK_SIGNAL (signo); | 194 EMACS_UNBLOCK_SIGNAL (signo); |
192 EMACS_REESTABLISH_SIGNAL (signo, alarm_signal); | 195 EMACS_REESTABLISH_SIGNAL (signo, alarm_signal); |
193 LONGJMP (break_system_call_jump, 0); | 196 LONGJMP (break_system_call_jump, 0); |
194 } | 197 } |
198 #endif | |
195 | 199 |
196 EMACS_REESTABLISH_SIGNAL (signo, alarm_signal); | 200 EMACS_REESTABLISH_SIGNAL (signo, alarm_signal); |
197 SIGRETURN; | 201 SIGRETURN; |
198 } | 202 } |
199 | 203 |
205 place to do arbitrary stuff like run asynch. handlers, but | 209 place to do arbitrary stuff like run asynch. handlers, but |
206 it needs to know whether the poll-for-quit asynch. timeout | 210 it needs to know whether the poll-for-quit asynch. timeout |
207 went off. Rather than put the code in to compute this | 211 went off. Rather than put the code in to compute this |
208 specially, we just set this flag. Should fix this. */ | 212 specially, we just set this flag. Should fix this. */ |
209 quit_check_signal_happened = 1; | 213 quit_check_signal_happened = 1; |
214 | |
215 #ifdef HAVE_UNIXOID_EVENT_LOOP | |
210 signal_fake_event (); | 216 signal_fake_event (); |
217 #endif | |
211 | 218 |
212 EMACS_REESTABLISH_SIGNAL (signo, alarm_signal); | 219 EMACS_REESTABLISH_SIGNAL (signo, alarm_signal); |
213 SIGRETURN; | 220 SIGRETURN; |
214 } | 221 } |
215 | 222 |
436 #endif /* ! (defined (ERROR_CHECKING) && defined (MACROIZE_ERROR_CHECKING)) */ | 443 #endif /* ! (defined (ERROR_CHECKING) && defined (MACROIZE_ERROR_CHECKING)) */ |
437 { | 444 { |
438 /* Else request quit when it's safe */ | 445 /* Else request quit when it's safe */ |
439 Vquit_flag = Qt; | 446 Vquit_flag = Qt; |
440 sigint_happened = 1; | 447 sigint_happened = 1; |
448 #ifdef HAVE_UNIXOID_EVENT_LOOP | |
441 signal_fake_event (); | 449 signal_fake_event (); |
450 #endif | |
442 } | 451 } |
443 errno = old_errno; | 452 errno = old_errno; |
444 SIGRETURN; | 453 SIGRETURN; |
445 } | 454 } |
446 | 455 |