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: restartable system calls under Linux


I am at a loss.

signal *does* restart
sigaction with SA_RESTART restarts
sigaction without SA_RESTART does *not* restart

And Yet:

guile> (= (logand (cdr (sigaction SIGWINCH)) SA_RESTART) SA_RESTART)
#t
guile>                                                                         
ERROR: In procedure fport_fill_input:
ERROR: Interrupted system call
ABORT: (system-error)
guile> 

(after changing window size)

If I add a siginterrupt(SIGWINCH, 0) or
  {
    struct sigaction action;

    sigaction(SIGWINCH, 0, &action);
    action.sa_flags |= SA_RESTART;
    sigaction(SIGWINCH, &action, 0);
  }
before the read() in fport_fill_input, things work fine!

It looks like something somewhere is turning off SA_RESTART.

???

-Dale

-- 
Dale P. Smith
Altus Technologies Corp.
dsmith@altustech.com
400-746-9000 x309

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