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
- Re: [Boston.pm] kill with parameter Komtanoo Pinpimai
- Re: [Boston.pm] kill with parameter Jerrad Pierce
- Re: [Boston.pm] kill with parameter Chris Devers
- [Boston.pm] Python vs Perl, according to Y... Federico Lucifredi
- Re: [Boston.pm] kill with parameter Andrew M. Langmead