mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-21 22:09:23 +01:00
7d94aee5b6
The Procss class was doing quite a bit of what Popen already does like storing the return code and process arguments. In addition the Process class ended up storing a Popen object which was frequently accessed. For both simplicity and memory savings have Process inherit Popen and add the additional functionality test-runner needs like stdout processing to output files and the console. To do this Popen.wait() needed to be overridden to to prevent blocking as well as wait for the HUP signal so we are sure all the process output was written. kill() was also overritten to perform cleanup. The most intrusive change was removing wait as a kwarg, and instead requiring the caller to call wait(). This doesn't change much in terms of complexity to the caller, but simplifies the __init__ routine of Process. Some convenient improvements: - Separate multiple process instance output (Terminate: <args> will be written to outfiles each time a process dies.) - Append to outfile if the same process is started again - Wait for HUP before returning from wait(). This allows any remaining output to be written without the need to manually call process_io. - Store ctx as a class variable so callers don't need to pass it in (e.g. when using Process directly rather than start_process) |
||
---|---|---|
.. | ||
hw.conf | ||
hwsim-dbus.conf | ||
hwsim.c | ||
hwsim.rst | ||
ios_convert.py | ||
probe-req.c | ||
run-iwd.sh | ||
test_runner_kernel_config | ||
test-runner |