Commit 496439d9 authored by Robert Haas's avatar Robert Haas

Fix compiler warning in WaitForBackgroundWorkerStartup().

Per complaint from Andrew Gierth.
parent 6e5f6e59
...@@ -863,7 +863,6 @@ BgwHandleStatus ...@@ -863,7 +863,6 @@ BgwHandleStatus
WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp) WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
{ {
BgwHandleStatus status; BgwHandleStatus status;
pid_t pid;
int rc; int rc;
bool save_set_latch_on_sigusr1; bool save_set_latch_on_sigusr1;
...@@ -874,9 +873,13 @@ WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp) ...@@ -874,9 +873,13 @@ WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
{ {
for (;;) for (;;)
{ {
pid_t pid;
CHECK_FOR_INTERRUPTS(); CHECK_FOR_INTERRUPTS();
status = GetBackgroundWorkerPid(handle, &pid); status = GetBackgroundWorkerPid(handle, &pid);
if (status == BGWH_STARTED)
*pidp = pid;
if (status != BGWH_NOT_YET_STARTED) if (status != BGWH_NOT_YET_STARTED)
break; break;
...@@ -900,6 +903,5 @@ WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp) ...@@ -900,6 +903,5 @@ WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
PG_END_TRY(); PG_END_TRY();
set_latch_on_sigusr1 = save_set_latch_on_sigusr1; set_latch_on_sigusr1 = save_set_latch_on_sigusr1;
*pidp = pid;
return status; return status;
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment