This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: restartable system calls under Linux
- To: "Dale P. Smith" <dpsm at en dot com>
- Subject: Re: restartable system calls under Linux
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 13 Jun 2000 15:59:17 +0200
- Cc: bug-guile <bug-guile at gnu dot org>, guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <39462278.64F61E48@en.com>
"Dale P. Smith" <dpsm@en.com> writes:
> Greetings,
>
> This is probably an autoconf bug instead of a Guile bug, but I thought I'd send it in anyway.
>
> On my system, Linux kernel 2.2.14, autoconf detects that system calls are restartable. When guile is configured without thread support, changing the size of an xterm window causes guile to return
> from a read() (and throw an error). If the macro HAVE_RESTARTABLE_SYSCALLS is not #defined, this does not happen.
>
> Autoconf detects restartable system calls by forking a process, and waiting on the child. The child sends the parent an interrupt during the wait. The code detects if the wait was restarted or not.
>
> Would it be better to more closely simulate what's actually happening? Something like sending an interrupt while doing a read?
If you (or someone else) give me a test which detects this situation,
I'll include it in Guile. We'll use a combination of the autoconf
test and the new test, demanding both to succeed in order to exclude
the loop in the SCM_SYSCALL macro.
Preferably, you would write an autoconf test, but a small test program
is also OK.
Best regards,
/mdj