From 83475a9241425edc527e131959ad32b9fa9976a7 Mon Sep 17 00:00:00 2001 From: velimo <57866906+robo-monk@users.noreply.github.com> Date: Sat, 4 Oct 2025 13:43:00 +0200 Subject: [PATCH] Handle EINTR error in waitpid call --- nob.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nob.h b/nob.h index 737f61f..eb8a794 100644 --- a/nob.h +++ b/nob.h @@ -1358,7 +1358,9 @@ NOBDEF bool nob_proc_wait(Nob_Proc proc) #else for (;;) { int wstatus = 0; - if (waitpid(proc, &wstatus, 0) < 0) { + int r = waitpid(proc, &wstatus, 0); + if (r < 0) { + if (r == -1 && errno == EINTR) continue; // continue if host process is interrupted nob_log(NOB_ERROR, "could not wait on command (pid %d): %s", proc, strerror(errno)); return false; }