This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: fport_fill_input SIGWINCH error


> Date: Sat, 20 May 2000 00:03:58 -0400
> From: "Dale P. Smith" <dpsm@en.com>
> 
> Chris Cramer wrote:
> > 
> > On Fri, May 19, 2000 at 01:15:26PM -0400, Dale P. Smith wrote:
> > > When configured without threads, guile throws an error when the xterm that guile is running in is resized.  My guess is that the read() in fport_fill_input is being interrupted by a SIGWINCH and needs
> > > to be restarted.  This does not happen when guile is configured with threads because of the fport_wait_for_input(port) before the read() ???
> > 
> > The difference between threaded and unthreaded Guile in this case is
> > that fport_fill_input just calls read() in unthreaded but in threaded
> > it calls select() first. First thing to do would be to check and see
> > that the select() call (in coop-threads.c?) is restarted on interruption.
> 
> Yes. fport_wait_for_input() loops over scm_internal_select when errno is EINTR.
> 
> > Ugh... if I had internet access at home I could post a patch to fix this
> > in a few minutes... =^(
> 
> Should the read() be restarted or should a select() be before the read?

Note that the call to read in fport_fill_input is already wrapped in
an EINTR-catching loop, that's what SCM_SYSCALL is for.  However it's
disabled if configure detects that system calls are restartable, since
it should be impossible to get the EINTR error in this case.  That's
the theory anyway.  I can't reproduce the problem (using a recent
linux 2.3 kernel) so I don't have any idea what's going wrong.  Presumably
libguile/scmconfig.h will contain the line:

#define HAVE_RESTARTABLE_SYSCALLS 1

and most likely removing this line and recompiling will make the problem
go away.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]