Skip to content

Commit

Permalink
Employ PL_shutdownhook
Browse files Browse the repository at this point in the history
  • Loading branch information
Leont committed Sep 30, 2024
1 parent 23d1cae commit db4b30a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
8 changes: 4 additions & 4 deletions dosish.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
* to work, but must NOT be retained in production code. */
#ifndef PERL_SYS_TERM_BODY
# define PERL_SYS_TERM_BODY() \
ENV_TERM; USER_PROP_MUTEX_TERM; LOCALE_TERM; \
HINTS_REFCNT_TERM; KEYWORD_PLUGIN_MUTEX_TERM; \
OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; \
PERLIO_TERM; MALLOC_TERM;
SHUTDOWN_TERM; ENV_TERM; USER_PROP_MUTEX_TERM; \
LOCALE_TERM;INTS_REFCNT_TERM; \
KEYWORD_PLUGIN_MUTEX_TERM;OP_CHECK_MUTEX_TERM; \
OP_REFCNT_TERM;PERLIO_TERM; MALLOC_TERM;
#endif
#define dXSUB_SYS dNOOP

Expand Down
2 changes: 2 additions & 0 deletions perl.h
Original file line number Diff line number Diff line change
Expand Up @@ -3606,6 +3606,8 @@ freeing any remaining Perl interpreters.
#define PERL_SYS_INIT3(argc, argv, env) Perl_sys_init3(argc, argv, env)
#define PERL_SYS_TERM() Perl_sys_term()

#define SHUTDOWN_TERM PL_shutdownhook();

#ifndef PERL_WRITE_MSG_TO_CONSOLE
# define PERL_WRITE_MSG_TO_CONSOLE(io, msg, len) PerlIO_write(io, msg, len)
#endif
Expand Down
8 changes: 4 additions & 4 deletions unixish.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ int afstat(int fd, struct stat *statb);
* to work, but must NOT be retained in production code. */
#ifndef PERL_SYS_TERM_BODY
# define PERL_SYS_TERM_BODY() \
ENV_TERM; USER_PROP_MUTEX_TERM; LOCALE_TERM; \
HINTS_REFCNT_TERM; KEYWORD_PLUGIN_MUTEX_TERM; \
OP_CHECK_MUTEX_TERM; OP_REFCNT_TERM; \
PERLIO_TERM; MALLOC_TERM; \
SHUTDOWN_TERM; ENV_TERM; USER_PROP_MUTEX_TERM; \
LOCALE_TERM; HINTS_REFCNT_TERM; \
KEYWORD_PLUGIN_MUTEX_TERM; OP_CHECK_MUTEX_TERM; \
OP_REFCNT_TERM; PERLIO_TERM; MALLOC_TERM; \
PLATFORM_SYS_TERM_;
#endif

Expand Down
1 change: 1 addition & 0 deletions win32/win32.c
Original file line number Diff line number Diff line change
Expand Up @@ -5502,6 +5502,7 @@ Perl_win32_init(int *argcp, char ***argvp)
void
Perl_win32_term(void)
{
SHUTDOWN_TERM;
HINTS_REFCNT_TERM;
OP_REFCNT_TERM;
PERLIO_TERM;
Expand Down

0 comments on commit db4b30a

Please sign in to comment.