mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-01 20:30:28 +02:00
(signal_delivery_thread): Restrict scm_i_pthread_sigmask
to HAVE_PTHREAD_SIGMASK, it doesn't exist on mingw. Reported by Nils Durner.
This commit is contained in:
parent
c9150d1ac9
commit
4d9ad6e23f
1 changed files with 9 additions and 2 deletions
|
@ -115,6 +115,12 @@ close_1 (SCM proc, SCM arg)
|
|||
}
|
||||
|
||||
#if SCM_USE_PTHREAD_THREADS
|
||||
/* On mingw there's no notion of inter-process signals, only a raise()
|
||||
within the process itself which apparently invokes the registered handler
|
||||
immediately. Not sure how well the following code will cope in this
|
||||
case. It builds but it may not offer quite the same scheme-level
|
||||
semantics as on a proper system. If you're relying on much in the way of
|
||||
signal handling on mingw you probably lose anyway. */
|
||||
|
||||
static int signal_pipe[2];
|
||||
|
||||
|
@ -158,12 +164,13 @@ read_without_guile (int fd, char *buf, size_t n)
|
|||
static SCM
|
||||
signal_delivery_thread (void *data)
|
||||
{
|
||||
sigset_t all_sigs;
|
||||
int n, sig;
|
||||
char sigbyte;
|
||||
|
||||
#if HAVE_PTHREAD_SIGMASK /* not on mingw, see notes above */
|
||||
sigset_t all_sigs;
|
||||
sigfillset (&all_sigs);
|
||||
scm_i_pthread_sigmask (SIG_SETMASK, &all_sigs, NULL);
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue