Process
– process handle¶
-
class
uv.
Process
(arguments, uid=None, gid=None, cwd=None, env=None, stdin=None, stdout=None, stderr=None, stdio=None, flags=<ProcessFlags.WINDOWS_HIDE: 16>, loop=None, on_exit=None)[source]¶ Process handles will spawn a new process and allow the user to control it and establish communication channels with it using streams.
-
stdin
= None¶ Standard input of the child process.
Readonly: True Type: int | uv.Stream | file-like | None
-
stdout
= None¶ Standard output of the child process.
Readonly: True Type: int | uv.Stream | file-like | None
-
stderr
= None¶ Standard error of the child process.
Readonly: True Type: int | uv.Stream | file-like | None
-
stdio
= None¶ Other standard file descriptors of the child process.
Readonly: True Type: list[int | uv.Stream | file-like]
-
on_exit
= None¶ Callback which should be called after process exited.
-
on_exit
(process_handle, returncode, signum) Parameters: - process_handle (uv.Process) – handle the call originates from
- returncode (int) – status code returned by the process on termination
- signum (int) – signal number caused the process to exit
Readonly: False Type: Callable[[uv.Process, int, int], None] -
-
-
class
uv.
CreatePipe
(readable=False, writable=False, ipc=False)[source]¶ Passed to one of the standard IO arguments of
Process
, it tells the library to create a new pipe to communicate with the child process.
-
uv.
PIPE
= <CreatePipe readable=True, writable=True, ipc=True>¶ Create a readable and writable inter process communication pipe.
-
class
uv.
ProcessFlags
[source]¶ Process configuration flags enumeration.
-
DETACHED
= None¶ Spawn the child process in a detached state – this will make it a process group leader, and will effectively enable the child to keep running after the parent exits. Note that the child process will still keep the parent’s event loop alive unless the parent process calls
uv.Handle.dereference()
on the child’s process handle.Type: uv.ProcessFlags
-
WINDOWS_HIDE
= None¶ Hide the subprocess console window that would normally be created. This option is only meaningful on Windows systems. On Unix it is ignored.
Type: uv.ProcessFlags
-
WINDOWS_VERBATIM
= None¶ Do not wrap any arguments in quotes, or perform any other escaping, when converting the argument list into a command line string. This option is only meaningful on Windows systems. On Unix it is ignored.
Type: uv.ProcessFlags
-