Author vstinner
Recipients amaury.forgeotdarc, astrand, gregory.p.smith, jnoller, jyasskin, mattjohnston, mpitt, naufraghi, schmir, timjr, vstinner
Date 2008-12-24.02:03:02
SpamBayes Score 0.000499745
Marked as misclassified No
Message-id <1230084183.73.0.147948316166.issue1068268@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2008-12-24 02:03:04vstinnersetrecipients: + vstinner, gregory.p.smith, astrand, amaury.forgeotdarc, mattjohnston, mpitt, timjr, jyasskin, schmir, jnoller, naufraghi
2008-12-24 02:03:03vstinnersetmessageid: <1230084183.73.0.147948316166.issue1068268@psf.upfronthosting.co.za>
2008-12-24 02:03:03vstinnerlinkissue1068268 messages
2008-12-24 02:03:02vstinnercreate