Process kill method non functional

Hi

There’s a problem with the Process kill method in that the kill is sent to the sh process - but not the child process - rendering this method non functional

I’ve crudely worked around as follows

kill (xProcess.pid () + 1, SIGTERM);
xProcess.kill ();

however this is not a robust solution - scanning /proc/ and matching parent pid would be more robust - but I wonder it if might be simpler to just dispense with the sh indirection? - that would solve this problem and improve efficiency - another way to solve this - and be more compatible - would be to generate a unique process group id for the sh process and then just kill that - currently the process group id inherits from the firmware

Regards

Julian

Hi

My better workaround is as follows

xProcess.kill ();
system ("killall childProcessName");

Regards

Julian

Interesting finding. Could you please open a new GitHub issue with the code reproduce this so we can solve this? Thanks!

1 Like