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 (kill.pl) with this code in it from the command line, it traps the signal:
However, if I run the same code as part of a CGI process (called from a web-form), or if I try and run kill.pl from#!/usr/bin/perl -w # attempt to kill a pid use strict; my $pid; open (PID, "<signwriter.pid"); while(<PID>){ $pid = $_; } kill 'ALRM', $pid;
nothing seems to happen.system "perl ./kill.pl";
I don't understand :(
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sending kill signals from perl CGIs
by chromatic (Archbishop) on Jan 02, 2003 at 03:17 UTC | |
|
Re: sending kill signals from perl CGIs
by mce (Curate) on Jan 02, 2003 at 12:39 UTC | |
|
Re: sending kill signals from perl CGIs
by fglock (Vicar) on Jan 02, 2003 at 13:15 UTC | |
|
Re: sending kill signals from perl CGIs
by tachekent (Acolyte) on Jan 02, 2003 at 03:26 UTC |