git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: bb8582a)
Add CHECK_FOR_INTERRUPTS() to the wait_pid() loop.
Sat, 7 Mar 2015 05:47:38 +0000 (00:47 -0500)
Sat, 7 Mar 2015 05:47:38 +0000 (00:47 -0500)
Though the one contemporary caller uses it in a limited way, this
function could loop indefinitely if pointed to an arbitrary PID.


diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 2e37d980af8877f5539388c4f5ff18accffa6399..d68c90cd9bbaa810c056d10c98895ba23a5cc9ee 100644 (file)
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -870,7 +870,10 @@ wait_pid(PG_FUNCTION_ARGS)
elog(ERROR, "must be superuser to check PID liveness");
while (kill(pid, 0) == 0)
+ {
+ CHECK_FOR_INTERRUPTS();
pg_usleep(50000);
+ }
if (errno != ESRCH)
elog(ERROR, "could not check PID %d liveness: %m", pid);
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /