Integrate:
[ 24940]
Add facility to fork() early in perl_destruct and use the child to
dump out leaked scalars (enabled with DEBUG_LEAKING_SCALARS_FORK_DUMP
when DEBUG_LEAKING_SCALARS is already in force)
[ 24976]
Extend DEBUG_LEAKING_SCALARS_FORK_DUMP so it can also dump scalars
which become unreferenced. This is less likely to be successful.
The #define needs a better name.
[ 24979]
If forking during global destruction, the child needs to close all
unused file descriptors, else it can cause other processes to hang
because it accidentally holds open pipes and sockets.
[ 24980]
Need to skip exporting PL_dumper_fd unless it is used.
[ 24984]
When using DEBUG_LEAKING_SCALARS_FORK_DUMP it's possible to cause
indefinite hangs when the debugging child holds open Perl_debug_log,
and it happens to be a file descriptor that is one end of a pipe,
with a process sitting at the other end waitng for EOF.
So close all descriptors in the child *including* Perl_debug_log,
and pass it back in over the control socket if it's needed.
[ 24986]
Tweak the child dump socket protocol to return error messages to the
parent so that it can display what went wrong.
p4raw-link: @24986 on //depot/perl:
808ad2d056cb45de9ecfc820f8a60d1c7ec74e62
p4raw-link: @24984 on //depot/perl:
bf3573334e260cec7a4095bce2ccbecb4bae4f96
p4raw-link: @24980 on //depot/perl:
808e22764acaa30a6102c376217d07f25df6e137
p4raw-link: @24979 on //depot/perl:
3125a5a42ead64ccadc87f6d7676d933d8d6582c
p4raw-link: @24976 on //depot/perl:
41e4abd8e288135291940b1765c485a707618c20
p4raw-link: @24940 on //depot/perl:
2aa47728aa947a41f1d2abaa0249b6e8da98653a
p4raw-id: //depot/maint-5.8/perl@25557
p4raw-integrated: from //depot/perl@24980 'edit in' makedef.pl
(@24883..)
p4raw-edited: from //depot/perl@24979 'edit in' perl.c (@24976..)
p4raw-edited: from //depot/perl@24976 'edit in' intrpvar.h (@24908..)
p4raw-integrated: from //depot/perl@24976 'merge in' embedvar.h
perlapi.h (@24908..) embed.fnc embed.h proto.h sv.c (@24966..)