STINNER Victor <victor.stin...@haypocalc.com> added the comment:

Instead of define a method for each "syscall", you can write a generic 
function that retry at OSError(EINTR):

def no_intr(self, func, *args, **kw):
  while True:
    try:
      return func(*args, **kw)
    except OSError, e:
      if e.errno == errno.EINTR:
        continue
      else:
        raise

x=_waitpid_no_intr(pid, options) becomes x=no_intr(os.waitpid, pid, 
options).

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1068268>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to