comparison unix.py @ 129:580f0f4687c3

Fixed EINTR fatally breaking another poll() call on Python 2.6-
author Oleg Oshmyan <chortos@inbox.lv>
date Mon, 16 May 2011 21:42:43 +0100
parents 42c8f5c152a5
children e84f33a60a5c
comparison
equal deleted inserted replaced
128:42c8f5c152a5 129:580f0f4687c3
181 try: 181 try:
182 select((sigchld_pipe_read,), (), (), case.maxwalltime) 182 select((sigchld_pipe_read,), (), (), case.maxwalltime)
183 except SelectError: 183 except SelectError:
184 if sys.exc_info()[1].args[0] != EINTR: 184 if sys.exc_info()[1].args[0] != EINTR:
185 raise 185 raise
186 if case.process.poll() is None: 186 # subprocess in Python 2.6- is not guarded against EINTR
187 raise testcases.WallTimeLimitExceeded 187 try:
188 if case.process.poll() is None:
189 raise testcases.WallTimeLimitExceeded
190 except OSError:
191 if sys.exc_info()[1].errno != EINTR:
192 raise
193 else:
194 case.process.poll()
188 else: 195 else:
189 wait(case.process) 196 wait(case.process)
190 else: 197 else:
191 if not case.maxwalltime: 198 if not case.maxwalltime:
192 try: 199 try: