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