Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5771

Re: connect SIGINT to custom interrupt handler

From Nobody <nobody@nowhere.com>
Subject Re: connect SIGINT to custom interrupt handler
Date 2011-05-19 11:34 +0100
Message-Id <pan.2011.05.19.10.34.28.125000@nowhere.com>
Newsgroups comp.lang.python
References <slrnisv835.b74.chris@scheingraber.no-ip.org> <04cee22d-fc07-4c54-b91b-3f9e4730f095@glegroupsg2000goo.googlegroups.com> <slrnit7icb.f3l.spam@scheingraber.no-ip.org> <18857efb-05be-42f0-8c62-40be5ec9dd26@gu8g2000vbb.googlegroups.com>
Organization Zen Internet

Show all headers | View raw


On Wed, 18 May 2011 07:16:40 -0700, Jean-Paul Calderone wrote:

> Setting SA_RESTART on SIGINT is probably the right thing to do.  It's not
> totally clear to me from the messages in this thread if you managed to get
> that approach working.

He didn't; select() isn't SA_RESTART-able.

Unfortunately, the author of select.select() decided to treat EINTR as an
error. It isn't; it's a "third way", neither success nor failure, similar
to EAGAIN. Normally, you would treat EINTR from select() in the same way
as a timeout.

While it's possible to work around this, the interface encourages getting
it wrong.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: connect SIGINT to custom interrupt handler Miki Tebeka <miki.tebeka@gmail.com> - 2011-05-15 08:25 -0700
  Re: connect SIGINT to custom interrupt handler Christoph Scheingraber <spam@scheingraber.net> - 2011-05-18 13:28 +0000
    Re: connect SIGINT to custom interrupt handler Jean-Paul Calderone <calderone.jeanpaul@gmail.com> - 2011-05-18 07:16 -0700
      Re: connect SIGINT to custom interrupt handler Nobody <nobody@nowhere.com> - 2011-05-19 11:34 +0100

csiph-web