diff options
author | John P. Linderman <jpl@research.att.com> | 2003-08-10 11:44:33 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2003-08-10 20:44:23 +0000 |
commit | 1e9c1022d083eab04a1d88cf3f92a6f2fc2b0791 (patch) | |
tree | eb761164cc5f5cf8ea73d8919e3082f1ccd29413 /pod/perlipc.pod | |
parent | 5dc8bdac4bb193458aa47dbb909b9b8f2afd9454 (diff) | |
download | perl-1e9c1022d083eab04a1d88cf3f92a6f2fc2b0791.tar.gz |
Re: killing for vital signs [PATCH]
From: "John P. Linderman" <jpl@research.att.com>
Message-Id: <200308101944.PAA96547@raptor.research.att.com>
p4raw-id: //depot/perl@20607
Diffstat (limited to 'pod/perlipc.pod')
-rw-r--r-- | pod/perlipc.pod | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/pod/perlipc.pod b/pod/perlipc.pod index 637030c726..8412bfd809 100644 --- a/pod/perlipc.pod +++ b/pod/perlipc.pod @@ -95,13 +95,22 @@ it doesn't kill itself): } Another interesting signal to send is signal number zero. This doesn't -actually affect another process, but instead checks whether it's alive +actually affect a child process, but instead checks whether it's alive or has changed its UID. unless (kill 0 => $kid_pid) { warn "something wicked happened to $kid_pid"; } +When directed at a process whose UID is not identical to that +of the sending process, signal number zero may fail because +you lack permission to send the signal, even though the process is alive. +You may be able to determine the cause of failure using C<$!>. + + unless (kill 0 => $pid or $! == $!{EPERM}) { + warn "$pid looks dead"; + } + You might also want to employ anonymous functions for simple signal handlers: |