summaryrefslogtreecommitdiff
path: root/proto.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-09-21 20:28:20 +0000
committerNicholas Clark <nick@ccl4.org>2005-09-21 20:28:20 +0000
commit8bbf20a91e90b9ad63e24543db43c7a449a3928b (patch)
tree7ef1ee8daf45f1114d4022a130697a90eef91e16 /proto.h
parent0236d32d2da2d7a5ec754ee24847f61e2283429e (diff)
downloadperl-8bbf20a91e90b9ad63e24543db43c7a449a3928b.tar.gz
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..)
Diffstat (limited to 'proto.h')
-rw-r--r--proto.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/proto.h b/proto.h
index c68cf68a58..3ac3dd7bef 100644
--- a/proto.h
+++ b/proto.h
@@ -2976,6 +2976,10 @@ PERL_CALLCONV bool Perl_stashpv_hvname_match(pTHX_ const COP *cop, const HV *hv)
__attribute__nonnull__(pTHX_2);
+#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
+PERL_CALLCONV void Perl_dump_sv_child(pTHX_ SV *sv);
+#endif
+
END_EXTERN_C
/*
* ex: set ts=8 sts=4 sw=4 noet: