[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
guile/guile-core/libguile scmsigs.c
From: |
Marius Vollmer |
Subject: |
guile/guile-core/libguile scmsigs.c |
Date: |
Sun, 25 Nov 2001 10:08:12 -0500 |
CVSROOT: /cvs
Module name: guile
Changes by: Marius Vollmer <address@hidden> 01/11/25 10:08:12
Modified files:
guile-core/libguile: scmsigs.c
Log message:
(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.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/guile/guile-core/libguile/scmsigs.c.diff?cvsroot=OldCVS&tr1=1.65&tr2=1.66&r1=text&r2=text
Patches:
Index: guile/guile-core/libguile/scmsigs.c
diff -u guile/guile-core/libguile/scmsigs.c:1.65
guile/guile-core/libguile/scmsigs.c:1.66
--- guile/guile-core/libguile/scmsigs.c:1.65 Sun Nov 11 10:01:51 2001
+++ guile/guile-core/libguile/scmsigs.c Sun Nov 25 10:08:12 2001
@@ -126,37 +126,8 @@
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