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

Delta Between Two Patch Sets: Lib/subprocess.py

Issue 22043: Use a monotonic clock to compute timeouts
Left Patch Set: Created 3 years, 1 month ago
Right Patch Set: Created 3 years 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:
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
(no file at all)
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 import sys 358 import sys
359 mswindows = (sys.platform == "win32") 359 mswindows = (sys.platform == "win32")
360 360
361 import io 361 import io
362 import os 362 import os
363 import time 363 import time
364 import signal 364 import signal
365 import builtins 365 import builtins
366 import warnings 366 import warnings
367 import errno 367 import errno
368 try: 368 from time import monotonic as _time
369 from time import monotonic as _time
370 except ImportError:
371 from time import time as _time
372 369
373 # Exception classes used by this module. 370 # Exception classes used by this module.
374 class SubprocessError(Exception): pass 371 class SubprocessError(Exception): pass
375 372
376 373
377 class CalledProcessError(SubprocessError): 374 class CalledProcessError(SubprocessError):
378 """This exception is raised when a process run by check_call() or 375 """This exception is raised when a process run by check_call() or
379 check_output() returns a non-zero exit status. 376 check_output() returns a non-zero exit status.
380 The exit status will be stored in the returncode attribute; 377 The exit status will be stored in the returncode attribute;
381 check_output() will also store the output in the output attribute. 378 check_output() will also store the output in the output attribute.
(...skipping 1301 matching lines...) Expand 10 before | Expand all | Expand 10 after
1683 1680
1684 def terminate(self): 1681 def terminate(self):
1685 """Terminate the process with SIGTERM 1682 """Terminate the process with SIGTERM
1686 """ 1683 """
1687 self.send_signal(signal.SIGTERM) 1684 self.send_signal(signal.SIGTERM)
1688 1685
1689 def kill(self): 1686 def kill(self):
1690 """Kill the process with SIGKILL 1687 """Kill the process with SIGKILL
1691 """ 1688 """
1692 self.send_signal(signal.SIGKILL) 1689 self.send_signal(signal.SIGKILL)
LEFTRIGHT

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