You're probably thinking of the TERM
signal handler, since KILL
can't be caught. Anyway, Windows doesn't use signals and while it lets you use them, it's within a single thread only, no sending signals to other processes.
You have a variety of other IPC mechanisms though, the usual one for requesting that another process exit gracefully is PostMessage(WM_QUIT)
, but that's really only applicable to graphical applications which Perl scripts usually aren't.
A well supported approach on Windows would be for the parent process to create an event (with the inheritable flag) and pass the handle to the child process, putting it into the environment would be very convenient for Perl. Then the child can perform an action in response to the event.
In addition to window message and kernel events you could use any of sockets, pipes, files, mailslots, process exit codes, shared memory, registry entries, and DDE to communicate between processes on Windows.