katnip.controllers.client.process module¶
-
class
katnip.controllers.client.process.
ClientProcessController
(name, process_path, process_args, process_env=None, logger=None)¶ Bases:
kitty.controllers.client.ClientController
ClientProcessController controls a process by starting it on each trigger. It uses subprocess.Popen and logs the process output (stdout, stderr)
-
__init__
(name, process_path, process_args, process_env=None, logger=None)¶ Parameters: - name – name of the object
- process_path – path to the target executable
- process_args – arguments to pass to the process
- process_env – the process environment (default: None)
- logger – logger for this object (default: None)
-
post_test
()¶ Logs stdout, stderr amd return code of the target process.
-
sig_dict
= {1: 'SIGHUP', 2: 'SIGINT', 3: 'SIGQUIT', 4: 'SIGILL', 5: 'SIGTRAP', 6: 'SIGABRT', 7: 'SIGBUS', 8: 'SIGFPE', 9: 'SIGKILL', 10: 'SIGUSR1', 11: 'SIGSEGV', 12: 'SIGUSR2', 13: 'SIGPIPE', 14: 'SIGALRM', 15: 'SIGTERM', 17: 'SIGCHLD', 18: 'SIGCONT', 19: 'SIGSTOP', 20: 'SIGTSTP', 21: 'SIGTTIN', 22: 'SIGTTOU', 23: 'SIGURG', 24: 'SIGXCPU', 25: 'SIGXFSZ', 26: 'SIGVTALRM', 27: 'SIGPROF', 28: 'SIGWINCH', 29: 'SIGIO', 30: 'SIGPWR', 31: 'SIGSYS', 34: 'SIGRTMIN', 64: 'SIGRTMAX'}¶
-
teardown
()¶ Stops the process and calls super’s teardown.
-
trigger
()¶ Starts the target in a subprocess
-