diff options
author | Marius Vollmer <mvo@zagadka.de> | 2001-11-25 15:08:12 +0000 |
---|---|---|
committer | Marius Vollmer <mvo@zagadka.de> | 2001-11-25 15:08:12 +0000 |
commit | 7123fc3b21c92ed8ac002adb826c74552c846407 (patch) | |
tree | b8a949d46d724faf51b2933aed70921baa0b6bad /libguile/scmsigs.c | |
parent | da6129a67e1ccf785fe54ecc4deca44453276140 (diff) | |
download | guile-7123fc3b21c92ed8ac002adb826c74552c846407.tar.gz |
(scm_take_signal): Removed all code that assumes that signal handlers
are allowed to divert the flow of control. Call
scm_system_async_mark_from_signal_handler instead of
scm_system_async_mark.
Diffstat (limited to 'libguile/scmsigs.c')
-rw-r--r-- | libguile/scmsigs.c | 31 |
1 files changed, 1 insertions, 30 deletions
diff --git a/libguile/scmsigs.c b/libguile/scmsigs.c index 5ee384995..97375e8af 100644 --- a/libguile/scmsigs.c +++ b/libguile/scmsigs.c @@ -126,37 +126,8 @@ static SIGRETTYPE (*orig_handlers[NSIG])(int); static SIGRETTYPE take_signal (int signum) { - int saved_errno = errno; - SCM ignored; - - if (!scm_ints_disabled) - { - /* For reasons of speed, the SCM_NEWCELL macro doesn't defer - interrupts. Instead, it first sets its argument to point to - the first cell in the list, and then advances the freelist - pointer to the next cell. Now, if this procedure is - interrupted, the only anomalous state possible is to have - both SCM_NEWCELL's argument and scm_freelist pointing to the - same cell. To deal with this case, we always throw away the - first cell in scm_freelist here. - - At least, that's the theory. I'm not convinced that that's - the only anomalous path we need to worry about. */ - SCM_NEWCELL (ignored); - } got_signal[signum] = 1; -#if HAVE_SIGACTION - /* unblock the signal before the scheme handler gets to run, since - it may use longjmp to escape (i.e., throw an exception). */ - { - sigset_t set; - sigemptyset (&set); - sigaddset (&set, signum); - sigprocmask (SIG_UNBLOCK, &set, NULL); - } -#endif - scm_system_async_mark (signal_async); - errno = saved_errno; + scm_system_async_mark_from_signal_handler (signal_async); } static SCM |