I've never heard of any method for a signalled process to
find out what process sent the signal; I don't think it's
possible.
Most daemons would just write these messages to their
logfile; httpd and named are examples. If your process
really wants to write to a terminal, perhaps it shouldn't
be a daemon. | [reply] |
The receiving process has to know what the uid of the
signalling pid is. In C, I think you use siginfo_t to
find out info on the signalling pid. I dunno if that maps
over to perl or not, tho.
Good luck, sorry I couldn't be of more help,
--
blue
| [reply] |
Try looking into the POSIX module if you're on a system
that supports POSIX (probably unix specific) and look
into the C sigaction function for your system (as suggested
by blue). The docs I have on the POSIX perl module says
that it supports sigaction. I've never used it, but it's
documented to be there...
mortis | [reply] |
The availability of this information depends on the platform.
A quick look on a BSDi machine and a linux machine didn't
reveal the siginfo_t support...
Stevens "Advanced Programming in the UNIX Environment"
implies that this is a SVR4 feature.
| [reply] |