Autor: Daniel Tiefnig Data: A: exim-dev Assumpte: Re: [exim-dev] Preliminary testing of a new Exim test suite
John Jetmore wrote: >> Just at the same place. I think signal "0" is supported on all
>> relevant platforms. It should be at least, shouldn't it?
>
> What exactly is this supposed to be doing? As far as I can tell it
> just tests whether a signal is deliverable to $pid,
Yes, that means it more or less tests whether the (correct: "any")
process with PID $pid is still running.
> but I'm not sure how that helps - you're still waiting for, eg, 9920
> to die, not 9922.
No. As $pid is taken from `cat $parm_cwd/spool/exim-daemon.*`, we get
the correct PID 9922, not 9920.
> If this really is what you want to do, do it inside perl:
> kill(0, $pid);
No, I'd love to, but that doesn't work, (here comes the "more or less"
from above) as "runtest" is running as an ordinary user, and the exim
process is running as user "root" or allready "$exim_user". As the
ordinary user we are not allowed to send signals to processes owned by
other users, and therefor we would always get failure. Allthought
kill(0,$pid) dosen't SEND a signal, it DOES test whether we are allowed
to send a signal to the subjective process.
> According to the perl book I'm looking at, signal 0 is the only
> signal that is portable across all platforms, including Win32, so it
> should be fine.