/* Defined in sysdep.c */
void get_tty_size (int, int *, int *);
-void request_sigio (void);
-void unrequest_sigio (void);
bool tabs_safe_p (int);
void init_baud_rate (int);
void init_sigio (int);
/* There is a tendency for a SIGIO signal to arrive within exit,
and cause a SIGHUP because the input descriptor is already closed. */
- unrequest_sigio ();
ignore_sigio ();
/* Do this only if terminating normally, we want glyph matrices
}
#endif
-void
-request_sigio (void)
-{
-#ifdef USABLE_SIGIO
- sigset_t unblocked;
-
- if (noninteractive)
- return;
-
- sigemptyset (&unblocked);
-# ifdef SIGWINCH
- sigaddset (&unblocked, SIGWINCH);
-# endif
- sigaddset (&unblocked, SIGIO);
- pthread_sigmask (SIG_UNBLOCK, &unblocked, 0);
-
- interrupts_deferred = 0;
-#endif
-}
-
-void
-unrequest_sigio (void)
-{
-#ifdef USABLE_SIGIO
- sigset_t blocked;
-
- if (noninteractive)
- return;
-
- sigemptyset (&blocked);
-# ifdef SIGWINCH
- sigaddset (&blocked, SIGWINCH);
-# endif
- sigaddset (&blocked, SIGIO);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
- interrupts_deferred = 1;
-#endif
-}
-
void
ignore_sigio (void)
{
goto retry_frame;
}
- /* Prevent various kinds of signals during display
- update. stdio is not robust about handling
- signals, which can cause an apparent I/O error. */
- if (interrupt_input)
- unrequest_sigio ();
-
pending |= update_frame (f, 0, 0);
f->cursor_type_changed = 0;
f->updated_p = 1;
if (sf->fonts_changed)
goto retry;
- /* Prevent various kinds of signals during display update.
- stdio is not robust about handling signals,
- which can cause an apparent I/O error. */
- if (interrupt_input)
- unrequest_sigio ();
-
if (FRAME_VISIBLE_P (sf) && !FRAME_OBSCURED_P (sf))
{
if (hscroll_windows (selected_window))
windows_or_buffers_changed = 0;
}
- /* Start SIGIO interrupts coming again. Having them off during the
- code above makes it less likely one will discard output, but not
- impossible, since there might be stuff in the system buffer here.
- But it is much hairier to try to do anything about that. */
- if (interrupt_input)
- request_sigio ();
-
/* If a frame has become visible which was not before, redisplay
again, so that we display it. Expose events for such a frame
(which it gets when becoming visible) don't call the parts of
#endif /* HAVE_WINDOW_SYSTEM */
end_of_redisplay:
- if (interrupt_input && interrupts_deferred)
- request_sigio ();
-
dynwind_end ();
}