Hi,   Maybe this helps:https://docstore.mik.ua/orelly/perl4/lperl/ch14_07.htm
I think you can "catch" the signal sent by system to cleanly exit.

Maybe you can then combine this with the following:
https://perldoc.perl.org/functions/kill.html
That should allow you to remove the child processes as well if you maintain an 
internal list of their pid's.

I hope that helps.
Bernard



Reply via email to