tachekent has asked for the wisdom of the Perl Monks concerning the following question:

I have a perl process running. When it starts up it writes it's PID into a file. It also has a signal trap.

When I run a file ( with this code in it from the command line, it traps the signal:

#!/usr/bin/perl -w # attempt to kill a pid use strict; my $pid; open (PID, "<"); while(<PID>){ $pid = $_; } kill 'ALRM', $pid;
However, if I run the same code as part of a CGI process (called from a web-form), or if I try and run from
system "perl ./";
nothing seems to happen.

I don't understand :(