diff options
author | David Golden <dagolden@cpan.org> | 2009-07-08 13:28:54 -0400 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-07-09 15:33:40 +0200 |
commit | e2c0f81f627951896aca833460887e6e8f20aba6 (patch) | |
tree | 48420005abab0f5a8a1ac5404d4c53fe45f79fd8 /pod/perldiag.pod | |
parent | 32878f30ba1216461c8932946f0868cda9920d62 (diff) | |
download | perl-e2c0f81f627951896aca833460887e6e8f20aba6.tar.gz |
Make kill() fatal for non-numeric pids
As the debate over the best way to deal with floating point
pids stalled, this is just for non-numeric, which at least
squashes the bug even if it's not the Platonic ideal for
everyone.
It also doesn't address overloaded objects that might not have
IV, NV or PV appropriately set, but the approach mirrors what is
done elsewhere in doio.c so I recommend applying this patch now and
fixing the problem of overloaded objects at some other time when
it can be done more globally, either through an improvement or
replacement of looks_like_number
Also updated POD for kill when process is 0 or negative and
fixed Test-Harness tests that used kill with a string pid.
(Test-Harness test fix also submitted upstream)
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r-- | pod/perldiag.pod | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index dc0c5ea3ee..9d58104ab8 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -830,6 +830,12 @@ processes, Perl has reset the signal to its default value. This situation typically indicates that the parent program under which Perl may be running (e.g. cron) is being very careless. +=item Can't kill a non-numeric process ID + +(F) Process identifiers must be (signed) integers. It is a fatal error to +attempt to kill() an undefined, empty-string or otherwise non-numeric +process identifier. + =item Can't "last" outside a loop block (F) A "last" statement was executed to break out of the current block, |