Lines 364-380
sub RemovePlugins {
Link Here
|
364 |
sub _restart_after_change { |
364 |
sub _restart_after_change { |
365 |
my ( $class, $params ) = @_; |
365 |
my ( $class, $params ) = @_; |
366 |
|
366 |
|
367 |
my $parent_pid = getpid(); |
367 |
if ( C4::Context->psgi_env ) { |
368 |
my $ppid = getppid(); # Get the parent process ID |
368 |
my $parent_pid = getpid(); |
369 |
|
369 |
my $ppid = getppid(); # Get the parent process ID |
370 |
# If the current process is not Plack parent, find the parent process recursively |
370 |
|
371 |
while ($parent_pid != $ppid) { |
371 |
# If the current process is not Plack parent, find the parent process recursively |
372 |
$parent_pid = $ppid; |
372 |
while ( $parent_pid != $ppid ) { |
373 |
$ppid = getppid(); |
373 |
$parent_pid = $ppid; |
374 |
} |
374 |
$ppid = getppid(); |
|
|
375 |
} |
375 |
|
376 |
|
376 |
# Send SIGUSR1 signal to Plack parent process for graceful restart |
377 |
# Send SIGUSR1 signal to Plack parent process for graceful restart |
377 |
kill 'HUP', $parent_pid; |
378 |
kill 'HUP', $parent_pid; |
|
|
379 |
} |
378 |
} |
380 |
} |
379 |
|
381 |
|
380 |
1; |
382 |
1; |
381 |
- |
|
|