[FRPythoneers] Signal Interrupt

PC Drew drewpc at colorado.edu
Sun Aug 27 22:12:01 MDT 2000


I'm trying to add signal handling to my program and I keep getting
the following error when I send the signal:

...
    (r,w,e) = select.select (r,w,e, timeout)
select.error: (4, 'Interrupted system call')

I read up on the siginterrupt(3) man page and saw the following:

The  siginterrupt()  function  changes  the restart behaviour when a system call is interrupted by the
signal sig.  If the flag argument is false (0), then system calls will be restarted if interrupted  by
the specified signal sig.  This is the default behaviour in Linux.  However, when a new signal handler
is specified with the signal(2) function, the system call is interrupted by default.

So, this is saying that you can use the c function siginterrupt()
in order to keep a signal from interrupting system calls.  This is
perfect!  It solves my problem!  Oh wait...this is in Python!  So, 
how do I fix this in my Python program?

--
PC Drew

"To understand recursion, we must first understand recursion."





More information about the FRPythoneers mailing list