Bug 30897: Limit to plack environments
I had a feeling we'd want to do this when I submitted the proof of concept, though I hadn't appreciated the wider issues that have now been highlighted.. it makes a lot of sense to limit to the plack scope. Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
0a0487d884
commit
57ee369e90
|
|
@ -364,17 +364,19 @@ sub RemovePlugins {
|
|||
sub _restart_after_change {
|
||||
my ( $class, $params ) = @_;
|
||||
|
||||
my $parent_pid = getpid();
|
||||
my $ppid = getppid(); # Get the parent process ID
|
||||
if ( C4::Context->psgi_env ) {
|
||||
my $parent_pid = getpid();
|
||||
my $ppid = getppid(); # Get the parent process ID
|
||||
|
||||
# If the current process is not Plack parent, find the parent process recursively
|
||||
while ($parent_pid != $ppid) {
|
||||
$parent_pid = $ppid;
|
||||
$ppid = getppid();
|
||||
# If the current process is not Plack parent, find the parent process recursively
|
||||
while ( $parent_pid != $ppid ) {
|
||||
$parent_pid = $ppid;
|
||||
$ppid = getppid();
|
||||
}
|
||||
|
||||
# Send SIGUSR1 signal to Plack parent process for graceful restart
|
||||
kill 'HUP', $parent_pid;
|
||||
}
|
||||
|
||||
# Send SIGUSR1 signal to Plack parent process for graceful restart
|
||||
kill 'HUP', $parent_pid;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue