asyncio.BaseSubprocessTransport

class asyncio.BaseSubprocessTransport

get_pid()

Return the subprocess process id as an integer.

get_pipe_transport(fd)

Return the transport for the communication pipe corresponding to the integer file descriptor fd:

  • 0: readable streaming transport of the standard input (stdin), or None if the subprocess was not created with stdin=PIPE
  • 1: writable streaming transport of the standard output (stdout), or None if the subprocess was not created with stdout=PIPE
  • 2: writable streaming transport of the standard error (stderr), or None if the subprocess was not created with stderr=PIPE
  • other fd: None
get_returncode()

Return the subprocess returncode as an integer or None if it hasn’t returned, similarly to the subprocess.Popen.returncode attribute.

kill(self)

Kill the subprocess, as in subprocess.Popen.kill().

On POSIX systems, the function sends SIGKILL to the subprocess. On Windows, this method is an alias for terminate().

send_signal(signal)

Send the signal number to the subprocess, as in subprocess.Popen.send_signal().

terminate()

Ask the subprocess to stop, as in subprocess.Popen.terminate(). This method is an alias for the close() method.

On POSIX systems, this method sends SIGTERM to the subprocess. On Windows, the Windows API function TerminateProcess() is called to stop the subprocess.

close()

Ask the subprocess to stop by calling the terminate() method if the subprocess hasn’t returned yet, and close transports of all pipes (stdin, stdout and stderr).

doc_python
2016-10-07 17:26:41
Comments
Leave a Comment

Please login to continue.