This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: restartable system calls under Linux
Curiouser and Curiouser,
There is a piece of code in scm_init_scmsigs:
#ifdef HAVE_RESTARTABLE_SYSCALLS
/* If HAVE_RESTARTABLE_SYSCALLS is defined, it's important that
signals really are restartable. don't rely on the same
run-time that configure got: reset the default for every signal.
*/
#ifdef HAVE_SIGINTERRUPT
siginterrupt (i, 0);
#elif defined(SA_RESTART)
{
struct sigaction action;
sigaction (i, NULL, &action);
if (!(action.sa_flags & SA_RESTART))
{
action.sa_flags &= SA_RESTART;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sigaction (i, &action, NULL);
}
}
#endif
/* if neither siginterrupt nor SA_RESTART are available we may
as well assume that signals are always restartable. */
#endif
Now I would think is should be setting the flag:
action.sa_flags |= SA_RESTART;
Unless I'm not understanding this.
Unfortunately, although this might be a bug, it doesn't fix my problem. I *do* have HAVE_SIGINTERRUPT defined, so this code isn't compiled. :(
-Dale
--
Dale P. Smith
Altus Technologies Corp.
dsmith@altustech.com
400-746-9000 x309