I've written a small HTTP server using the HTTP::Daemon module and am wanting to also generate a systemd service (please no flames :) for it. I know that it, my script, forks multiple children and I see in the sample code that I used as a template, it keeps the pids in a hash. I suspect I can trap the signal that "systemctl stop xxx" throws and iterate through that hash to kill them off one by one. I know that killing the original process ID with HUP doesn't terminate the children so before I waste a whole lot of time I thought I'd ask someone who knows more about the "proper" way to do it.
I did see something about SIG but I didn't quite understand what it was doing. I did try to kill the original process with TERM since it was mentioned, but that didn't work either. Thanks for any info. Jim.