From 7581f9cdbacd891daeb3c8e04ba54487ae762069 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 21 Aug 2022 15:48:26 +0100 Subject: [PATCH] prefork-interp: change API Signed-off-by: Ian Jackson --- scripts/Proc/Prefork/Interp.pm | 12 +++++++++--- scripts/prefork-interp-test | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/Proc/Prefork/Interp.pm b/scripts/Proc/Prefork/Interp.pm index ab29ebc..fbe5dbb 100644 --- a/scripts/Proc/Prefork/Interp.pm +++ b/scripts/Proc/Prefork/Interp.pm @@ -2,8 +2,10 @@ package Proc::Prefork::Interp; require Exporter; our @ISA = qw(Exporter); -our @EXPORT = qw(initialisation_complete); -our @EXPORT_OK = qw(@autoreload_extra_files); +our @EXPORT = qw( + prefork_initialisation_complete + prefork_autoreload_also_check + ); use strict; @@ -25,6 +27,10 @@ our $startup_mtime; our @autoreload_extra_files = (); +sub prefork_autoreload_also_check { + push @autoreload_extra_files, @_; +} + sub fail_log ($) { my ($m) = @_; if ($fail_log) { @@ -184,7 +190,7 @@ sub autoreload_check ($) { } } -sub initialisation_complete { +sub prefork_initialisation_complete { my %opts = @_; # if env var not set, we're not running under prefork-interp diff --git a/scripts/prefork-interp-test b/scripts/prefork-interp-test index c25bd07..daa43ea 100755 --- a/scripts/prefork-interp-test +++ b/scripts/prefork-interp-test @@ -15,7 +15,7 @@ sub prwhen ($) { prwhen('BEGIN'); -initialisation_complete(); +prefork_initialisation_complete(); prwhen('AFTER'); -- 2.30.2