diff options
author | bojilund <bo.johansso@lsn.se> | 2011-06-07 10:24:43 +0200 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-06-07 08:44:09 -0700 |
commit | bd1171b0bf64cd8215cb6faa3bbffd0f902343ed (patch) | |
tree | 47e78abc7b9c32de5918da22b3b09fbfb4509785 /pod | |
parent | ea9eb35a366bc919762b9c4072c62d67709cbb9d (diff) | |
download | perl-bd1171b0bf64cd8215cb6faa3bbffd0f902343ed.tar.gz |
Add information about portability caveats related to using kill on forked process.
The outcome of kill on a pseudo-process in Windows is unpredictable
and it should not be used except under dire circumstances.
The process which implements the pseudo-processes can be blocked
and the Perl interpreter hangs.
Diffstat (limited to 'pod')
-rw-r--r-- | pod/perlfork.pod | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/pod/perlfork.pod b/pod/perlfork.pod index 709d053d28..4257b877d1 100644 --- a/pod/perlfork.pod +++ b/pod/perlfork.pod @@ -78,10 +78,12 @@ and return its status. =item kill() C<kill('KILL', ...)> can be used to terminate a pseudo-process by -passing it the ID returned by fork(). This should not be used except +passing it the ID returned by fork(). The outcome of kill on a pseudo-process +is unpredictable and it should not be used except under dire circumstances, because the operating system may not guarantee integrity of the process resources when a running thread is -terminated. Note that using C<kill('KILL', ...)> on a +terminated. The process which implements the pseudo-processes can be blocked +and the Perl interpreter hangs. Note that using C<kill('KILL', ...)> on a pseudo-process() may typically cause memory leaks, because the thread that implements the pseudo-process does not get a chance to clean up its resources. @@ -307,6 +309,12 @@ are expected to be fixed for thread-safety. =back +=head1 PORTABILITY CAVEATS + +In portable Perl code, C<kill(9, $child)> must not be used on forked processes. +Killing a forked process is unsafe and have unpredictable results. +See L</kill()>, above. + =head1 BUGS =over 8 |