Content-Length: 259652 | pFad | http://github.com/postgrespro/postgres/commit/93751570731ba08dca4e791234984c3b1a15e885

19 Add CHECK_FOR_INTERRUPTS() to the wait_pid() loop. · postgrespro/postgres@9375157 · GitHub
Skip to content

Commit 9375157

Browse files
committed
Add CHECK_FOR_INTERRUPTS() to the wait_pid() loop.
Though the one contemporary caller uses it in a limited way, this function could loop indefinitely if pointed to an arbitrary PID.
1 parent bb8582a commit 9375157

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/test/regress/regress.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,10 @@ wait_pid(PG_FUNCTION_ARGS)
870870
elog(ERROR, "must be superuser to check PID liveness");
871871

872872
while (kill(pid, 0) == 0)
873+
{
874+
CHECK_FOR_INTERRUPTS();
873875
pg_usleep(50000);
876+
}
874877

875878
if (errno != ESRCH)
876879
elog(ERROR, "could not check PID %d liveness: %m", pid);

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/93751570731ba08dca4e791234984c3b1a15e885

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy