]> git.ozlabs.org Git - ccan/commitdiff
ptr_valid: fix spurious SIGINT under lldb on MacOS
authorRusty Russell <rusty@rustcorp.com.au>
Fri, 6 Apr 2018 07:26:26 +0000 (16:56 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Fri, 6 Apr 2018 07:26:26 +0000 (16:56 +0930)
(Taken from PR for lightning)

Patch-from: https://github.com/conanoc
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/ptr_valid/ptr_valid.c

index dc61dd27cbc1fbd46a06e73ad25d4c1bb6fb9848..7931984023ce02b439d26e2660e27919476b75dc 100644 (file)
@@ -161,7 +161,7 @@ static void finish_child(struct ptr_valid_batch *batch)
 {
        close(batch->to_child);
        close(batch->from_child);
-       waitpid(batch->child_pid, NULL, 0);
+       while (waitpid(batch->child_pid, NULL, 0) < 0 && errno == EINTR);
        batch->child_pid = 0;
 }