pash icon indicating copy to clipboard operation
pash copied to clipboard

PaSh cleanup should remove all nodes

Open nvasilakis opened this issue 3 years ago • 2 comments

Upon abnormal exit/kill, PaSh should kill the entire process tree under it (without leaving any eager or other commands running).

nvasilakis avatar Feb 02 '22 19:02 nvasilakis

Note that this is not as straightforward as it might sound! Some notes:

  • It is not clear if this issue still persists or if it only happened in previous versions of pash.
  • The biggest issue with hanging processes is not the daemon and the main pash process, but rather the parallel scripts that contain eagers etc. Therefore, our solution should modify (or use) this https://github.com/binpash/pash/blob/main/runtime/wait_for_output_and_sigpipe_rest.sh or be a trap handler in the output parallel script. For both of those, we should make sure to check for the performance overhead.
  • Our solution should kill all processes of the dataflow graph and wait for them.
  • Our solution should only kill processes that are descendants of the current shell (and no more).

Also, this change should not go to main but to future since it is an experimental change.

angelhof avatar Feb 04 '22 14:02 angelhof

If we can fix #500, then we should be able to fix this one here too.

angelhof avatar Mar 14 '22 17:03 angelhof