[Python-Dev] Re: Signal-resistant code (was: Two random and nearly unrelated ideas)

Neil Schemenauer nas@python.ca
Thu, 5 Sep 2002 11:52:28 -0700


Oren Tirosh wrote:
> If this macro is defined you will never get EINTR so there's no need to
> worry about this. If it isn't defined you need to restart system calls 
> yourself.

I don't think that is correct.  Only certain systems calls will be
restarted (for BSD 4.2 it's ioctl, read, readv, write, writev, wait, and
waitpid).  I think the system calls restarted varies depending on the
OS.

Signals are a gigantic mess.  I'm starting to doubt that you realize the
extent of the brain damage.  While I would be pleased if there was some
way Python could hide the mess, I'm not convinced it is possible.

  Neil