Skip to content

Commit 2466cda

Browse files
committed
Added note to AutoInactiveDestroy recommending it be enabled in new code.
1 parent 839b866 commit 2466cda

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

Changes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ DBI::Changes - List of significant changes to the DBI
2525

2626
Added security notice to DBD::Proxy and DBI::ProxyServer because they
2727
use Storable which is insecure. Thanks to [email protected] RT#90475
28+
Added note to AutoInactiveDestroy docs strongly recommending that it
29+
is enabled in all new code.
2830

2931
=head2 Changes in DBI 1.631 - 20th Jan 2014
3032

DBI.pm

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3690,8 +3690,8 @@ the destruction of inherited handles cause the corresponding handles in the
36903690
parent process to cease working.
36913691
36923692
Either the parent or the child process, but not both, should set
3693-
C<InactiveDestroy> true on all their shared handles. Alternatively the
3694-
L</AutoInactiveDestroy> can be set in the parent on connect.
3693+
C<InactiveDestroy> true on all their shared handles. Alternatively, and
3694+
preferably, the L</AutoInactiveDestroy> can be set in the parent on connect.
36953695
36963696
To help tracing applications using fork the process id is shown in
36973697
the trace log whenever a DBI or handle trace() method is called.
@@ -3704,12 +3704,15 @@ from the DBI's method dispatcher, e.g. >= 9.
37043704
Type: boolean, inherited
37053705
37063706
The L</InactiveDestroy> attribute, described above, needs to be explicitly set
3707-
in the child process after a fork(). This is a problem if the code that performs
3708-
the fork() is not under your control, perhaps in a third-party module.
3709-
Use C<AutoInactiveDestroy> to get around this situation.
3707+
in the child process after a fork(), on every active database and statement handle.
3708+
This is a problem if the code that performs the fork() is not under your
3709+
control, perhaps in a third-party module. Use C<AutoInactiveDestroy> to get
3710+
around this situation.
37103711
37113712
If set true, the DESTROY method will check the process id of the handle and, if
37123713
different from the current process id, it will set the I<InactiveDestroy> attribute.
3714+
It is strongly recommended that C<AutoInactiveDestroy> is enabled on all new code
3715+
(it's only not enabled by default to avoid backwards compatibility problems).
37133716
37143717
This is the example it's designed to deal with:
37153718

0 commit comments

Comments
 (0)