File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -440,12 +440,14 @@ ReportBackgroundWorkerExit(slist_mutable_iter *cur)
440440{
441441 RegisteredBgWorker * rw ;
442442 BackgroundWorkerSlot * slot ;
443+ int notify_pid ;
443444
444445 rw = slist_container (RegisteredBgWorker , rw_lnode , cur -> cur );
445446
446447 Assert (rw -> rw_shmem_slot < max_worker_processes );
447448 slot = & BackgroundWorkerData -> slot [rw -> rw_shmem_slot ];
448449 slot -> pid = rw -> rw_pid ;
450+ notify_pid = rw -> rw_worker .bgw_notify_pid ;
449451
450452 /*
451453 * If this worker is slated for deregistration, do that before notifying
@@ -458,8 +460,8 @@ ReportBackgroundWorkerExit(slist_mutable_iter *cur)
458460 rw -> rw_worker .bgw_restart_time == BGW_NEVER_RESTART )
459461 ForgetBackgroundWorker (cur );
460462
461- if (rw -> rw_worker . bgw_notify_pid != 0 )
462- kill (rw -> rw_worker . bgw_notify_pid , SIGUSR1 );
463+ if (notify_pid != 0 )
464+ kill (notify_pid , SIGUSR1 );
463465}
464466
465467/*
You can’t perform that action at this time.
0 commit comments