summaryrefslogtreecommitdiff
path: root/pod/perlfork.pod
diff options
context:
space:
mode:
authorbojilund <bo.johansso@lsn.se>2011-06-07 10:24:43 +0200
committerFather Chrysostomos <sprout@cpan.org>2011-06-07 08:44:09 -0700
commitbd1171b0bf64cd8215cb6faa3bbffd0f902343ed (patch)
tree47e78abc7b9c32de5918da22b3b09fbfb4509785 /pod/perlfork.pod
parentea9eb35a366bc919762b9c4072c62d67709cbb9d (diff)
downloadperl-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/perlfork.pod')
-rw-r--r--pod/perlfork.pod12
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