• Home
  • Raw
  • Download

Lines Matching +full:- +full:- +full:detach +full:- +full:sig

1 # subprocess - Subprocesses with accessible I/O streams
5 # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se>
28 ---------
46 check_output() returns a non-zero exit status.
56 return "Command '%s' returned non-zero exit status %d" % (self.cmd, self.returncode)
118 PIPE = -1
119 STDOUT = -2
137 """Return a list of command-line arguments reproducing the current
156 args.append('-' + opt * v)
158 args.append('-R')
160 args.append('-W' + opt)
170 retcode = call(["ls", "-l"])
183 check_call(["ls", "-l"])
197 If the exit code was non-zero it raises a CalledProcessError. The
203 >>> check_output(["ls", "-l", "/dev/null"])
204 'crw-rw-rw- 1 root root 1, 3 Oct 18 2007 /dev/null\n'
209 >>> check_output(["/bin/sh", "-c",
210 ... "ls -l non_existent_file ; exit 0"],
254 # http://msdn.microsoft.com/en-us/library/17w5ykft.aspx
256 # "Parsing C++ Command-Line Arguments"
373 # ------ -----
374 # p2cwrite ---stdin---> p2cread
375 # c2pread <--stdout--- c2pwrite
376 # errread <--stderr--- errwrite
412 p2cwrite = msvcrt.open_osfhandle(p2cwrite.Detach(), 0)
414 c2pread = msvcrt.open_osfhandle(c2pread.Detach(), 0)
416 errread = msvcrt.open_osfhandle(errread.Detach(), 0)
454 stdout and stderr, until end-of-file is reached. Wait for
517 # Assuming file-like object
534 # Assuming file-like object
553 # Assuming file-like object
579 # Eeek - file-not-found - possibly an embedding
580 # situation - see if we can locate it in sys.exec_prefix
728 # bpo-19612, bpo-30418: On Windows, stdin.write()
761 def send_signal(self, sig): argument
764 if sig == signal.SIGTERM:
766 elif sig == signal.CTRL_C_EVENT:
768 elif sig == signal.CTRL_BREAK_EVENT:
771 raise ValueError("Unsupported signal: {}".format(sig))
811 # Assuming file-like object
822 # Assuming file-like object
838 # Assuming file-like object
893 # user of a --without-threads build.
914 args = ["/bin/sh", "-c"] + args
933 # Disable gc to avoid bug where gc -> file_dealloc ->
934 # write to stderr -> hang.
968 # would be a no-op (issue #10806).
991 # Close all other fds, if asked for - after
1057 self.returncode = -_WTERMSIG(sts)
1061 self.returncode = -_WSTOPSIG(sts)
1266 def send_signal(self, sig): argument
1269 os.kill(self.pid, sig)