Content-Length: 288117 | pFad | http://github.com/postgrespro/postgres/commit/496439d943565bdb6cb2eef534cce551c30e8a0f

C1 Fix compiler warning in WaitForBackgroundWorkerStartup(). · postgrespro/postgres@496439d · GitHub
Skip to content

Commit 496439d

Browse files
committed
Fix compiler warning in WaitForBackgroundWorkerStartup().
Per complaint from Andrew Gierth.
1 parent 6e5f6e5 commit 496439d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/backend/postmaster/bgworker.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@ BgwHandleStatus
863863
WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
864864
{
865865
BgwHandleStatus status;
866-
pid_t pid;
867866
int rc;
868867
bool save_set_latch_on_sigusr1;
869868

@@ -874,9 +873,13 @@ WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
874873
{
875874
for (;;)
876875
{
876+
pid_t pid;
877+
877878
CHECK_FOR_INTERRUPTS();
878879

879880
status = GetBackgroundWorkerPid(handle, &pid);
881+
if (status == BGWH_STARTED)
882+
*pidp = pid;
880883
if (status != BGWH_NOT_YET_STARTED)
881884
break;
882885

@@ -900,6 +903,5 @@ WaitForBackgroundWorkerStartup(BackgroundWorkerHandle *handle, pid_t *pidp)
900903
PG_END_TRY();
901904

902905
set_latch_on_sigusr1 = save_set_latch_on_sigusr1;
903-
*pidp = pid;
904906
return status;
905907
}

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/496439d943565bdb6cb2eef534cce551c30e8a0f

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy