Message78253
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). |
|
Date |
User |
Action |
Args |
2008-12-24 02:03:04 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, astrand, amaury.forgeotdarc, mattjohnston, mpitt, timjr, jyasskin, schmir, jnoller, naufraghi |
2008-12-24 02:03:03 | vstinner | set | messageid: <1230084183.73.0.147948316166.issue1068268@psf.upfronthosting.co.za> |
2008-12-24 02:03:03 | vstinner | link | issue1068268 messages |
2008-12-24 02:03:02 | vstinner | create | |
|