QemuPopen#
- class wattson.networking.namespaces.qemu_popen.QemuPopen(cmd, **kwargs)#
Bases:
Popen
Methods
Create new Popen instance.
Interact with process: Send data to stdin and close it.
Kill the process with SIGKILL
Check if child process has terminated.
Send a signal to the process.
Terminate the process with SIGTERM
Wait for child process to terminate; returns self.returncode.
Attributes
pid
returncode
- __init__(cmd, **kwargs)#
Create new Popen instance.
- communicate(input=None, timeout=None)#
Interact with process: Send data to stdin and close it. Read data from stdout and stderr, until end-of-file is reached. Wait for process to terminate.
The optional “input” argument should be data to be sent to the child process, or None, if no data should be sent to the child. communicate() returns a tuple (stdout, stderr).
By default, all communication is in bytes, and therefore any “input” should be bytes, and the (stdout, stderr) will be bytes. If in text mode (indicated by self.text_mode), any “input” should be a string, and (stdout, stderr) will be strings decoded according to locale encoding, or by “encoding” if set. Text mode is triggered by setting any of text, encoding, errors or universal_newlines.
- kill()#
Kill the process with SIGKILL
- poll()#
Check if child process has terminated. Set and return returncode attribute.
- send_signal(sig)#
Send a signal to the process.
- terminate()#
Terminate the process with SIGTERM
- wait(timeout=None, _interval: float = 0.05)#
Wait for child process to terminate; returns self.returncode.