ltx2any icon indicating copy to clipboard operation
ltx2any copied to clipboard

When cancelling a run, engine processes survive

Open akerbos opened this issue 10 years ago • 2 comments

When we cancel a run with CTRL+C, engine processes that were started are not (always) killed. They even survive termination of the original ltx2any process!

Investigate and resolve.

akerbos avatar Nov 19 '15 17:11 akerbos

Possible solution: store PIDs of all running child processes and skill them explicitly.

http://stackoverflow.com/questions/32965251/how-can-i-kill-process-which-has-spawned-a-child-using-system

Getting the PID is easy: f = IO::popen(...); f.pid
Killing as well: Process.kill("TERM", pid)

akerbos avatar Jun 17 '16 17:06 akerbos

Other possibilty: set up a signal handler.

http://stackoverflow.com/a/14636093/539599

Do we still want to deal with CTRL+C differently is daemon mode is running? Could use this to completely overhaul how signals are processed -- which should probably happen, anyway.

akerbos avatar Jun 17 '16 17:06 akerbos