How to kill/restart a HTTP::Daemon perl script properly.

Jim Lynch <[email protected]> Thu, 28 May 2020 15:12:37 -0400
Newsgroups gmane.comp.lang.perl.modules.lwp
Message-ID <[email protected]>
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.=C2=
=A0
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.=C2=A0 =
I
suspect I can trap the signal that "systemctl stop xxx" throws and
iterate through that hash to kill them off one by one.=C2=A0 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.=C2=A0 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.