mirror of
https://github.com/Perl/perl5.git
synced 2026-01-27 01:44:43 +00:00
Add PL_shutdownhook
This commit is contained in:
parent
5613dc601d
commit
23d1caeec8
@ -2353,6 +2353,7 @@ p |void |no_bareword_filehandle \
|
||||
|NN const char *fhname
|
||||
Tefprv |void |noperl_die |NN const char *pat \
|
||||
|...
|
||||
CGTdp |void |noshutdownhook
|
||||
Adp |int |nothreadhook
|
||||
p |void |notify_parser_that_encoding_changed
|
||||
: Used in perly.y
|
||||
|
||||
1
embed.h
1
embed.h
@ -452,6 +452,7 @@
|
||||
# define new_stackinfo(a,b) Perl_new_stackinfo(aTHX_ a,b)
|
||||
# define new_stackinfo_flags(a,b,c) Perl_new_stackinfo_flags(aTHX_ a,b,c)
|
||||
# define new_version(a) Perl_new_version(aTHX_ a)
|
||||
# define noshutdownhook Perl_noshutdownhook
|
||||
# define nothreadhook() Perl_nothreadhook(aTHX)
|
||||
# define op_append_elem(a,b,c) Perl_op_append_elem(aTHX_ a,b,c)
|
||||
# define op_append_list(a,b,c) Perl_op_append_list(aTHX_ a,b,c)
|
||||
|
||||
13
perl.c
13
perl.c
@ -480,6 +480,19 @@ Perl_nothreadhook(pTHX)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
=for apidoc noshutdownhook
|
||||
|
||||
Stub that provides shutdown hook.
|
||||
|
||||
=cut
|
||||
*/
|
||||
|
||||
void
|
||||
Perl_noshutdownhook()
|
||||
{
|
||||
}
|
||||
|
||||
#ifdef DEBUG_LEAKING_SCALARS_FORK_DUMP
|
||||
void
|
||||
Perl_dump_sv_child(pTHX_ SV *sv)
|
||||
|
||||
1
perl.h
1
perl.h
@ -5350,6 +5350,7 @@ typedef int (*thrhook_proc_t) (pTHX);
|
||||
typedef OP* (*PPADDR_t[]) (pTHX);
|
||||
typedef bool (*destroyable_proc_t) (pTHX_ SV *sv);
|
||||
typedef void (*despatch_signals_proc_t) (pTHX);
|
||||
typedef void (*shutdown_proc_t)();
|
||||
|
||||
#if defined(__DYNAMIC__) && defined(PERL_DARWIN) && defined(PERL_CORE)
|
||||
# include <crt_externs.h> /* for the env array */
|
||||
|
||||
@ -380,6 +380,12 @@ PERLVAR(G, user_prop_mutex, perl_mutex) /* Mutex for manipulating
|
||||
PL_user_defined_properties */
|
||||
#endif
|
||||
|
||||
/* This hook is called during system termination (PERL_SYS_TERM).
|
||||
* This is needed for tearing down threads::shared and probably
|
||||
* not be used for anything else.
|
||||
*/
|
||||
PERLVARI(G, shutdownhook, shutdown_proc_t, &Perl_noshutdownhook);
|
||||
|
||||
/* these record the best way to perform certain IO operations while
|
||||
* atomically setting FD_CLOEXEC. On the first call, a probe is done
|
||||
* and the result recorded for use by subsequent calls.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user