Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(209)

Delta Between Two Patch Sets: Lib/subprocess.py

Issue 22043: Use a monotonic clock to compute timeouts
Left Patch Set: Created 3 years, 4 months ago
Right Patch Set: Created 3 years, 2 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « Lib/socketserver.py ('k') | Lib/telnetlib.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 # subprocess - Subprocesses with accessible I/O streams 1 # subprocess - Subprocesses with accessible I/O streams
2 # 2 #
3 # For more information about this module, see PEP 324. 3 # For more information about this module, see PEP 324.
4 # 4 #
5 # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> 5 # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
6 # 6 #
7 # Licensed to PSF under a Contributor Agreement. 7 # Licensed to PSF under a Contributor Agreement.
8 # See http://www.python.org/2.4/license for licensing details. 8 # See http://www.python.org/2.4/license for licensing details.
9 9
10 r"""subprocess - Subprocesses with accessible I/O streams 10 r"""subprocess - Subprocesses with accessible I/O streams
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 self.closed = True 454 self.closed = True
455 CloseHandle(self) 455 CloseHandle(self)
456 456
457 def Detach(self): 457 def Detach(self):
458 if not self.closed: 458 if not self.closed:
459 self.closed = True 459 self.closed = True
460 return int(self) 460 return int(self)
461 raise ValueError("already closed") 461 raise ValueError("already closed")
462 462
463 def __repr__(self): 463 def __repr__(self):
464 return "Handle(%d)" % int(self) 464 return "%s(%d)" % (self.__class__.__name__, int(self))
465 465
466 __del__ = Close 466 __del__ = Close
467 __str__ = __repr__ 467 __str__ = __repr__
468 468
469 469
470 # This lists holds Popen instances for which the underlying process had not 470 # This lists holds Popen instances for which the underlying process had not
471 # exited at the time its __del__ method got called: those processes are wait()ed 471 # exited at the time its __del__ method got called: those processes are wait()ed
472 # for synchronously from _cleanup() when a new Popen object is created, to avoid 472 # for synchronously from _cleanup() when a new Popen object is created, to avoid
473 # zombie processes. 473 # zombie processes.
474 _active = [] 474 _active = []
(...skipping 1205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 1680
1681 def terminate(self): 1681 def terminate(self):
1682 """Terminate the process with SIGTERM 1682 """Terminate the process with SIGTERM
1683 """ 1683 """
1684 self.send_signal(signal.SIGTERM) 1684 self.send_signal(signal.SIGTERM)
1685 1685
1686 def kill(self): 1686 def kill(self):
1687 """Kill the process with SIGKILL 1687 """Kill the process with SIGKILL
1688 """ 1688 """
1689 self.send_signal(signal.SIGKILL) 1689 self.send_signal(signal.SIGKILL)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7