Hello,

Sorry. This question is not directly related to Perl. However, I'm so curious for a long time that why unix doesn't allow us to pass parameters to "kill system call". For example, I want to do this:

kill -HUP -input "Hello World" 1234

That will send signal HUP and string "Hello World" as a parameter to process 1234 so that I can catch the signal like this:

$SIG{HUP}=sub {
my $string=shift;

if ($string eq "Hello World") {
#do something..
} else {
#do another
}
};

In realistic, I have to create a "configuration file" before sending the SIGNAL to tell the parameter to the process.

kill -HUP 1234

$SIG{HUP}=sub {
# $data= read file "foo.ipc"
if ($data) {
#xxx
} else {
#zzz
}
};

--
$_=`perldoc -U -q "What is a"`;m/"(.*?)"/;print$1



_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to