From be5013d805f97a8eeba3ceb9f753495c3b4f4f78 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Sun, 26 Apr 2026 23:22:46 -0400 Subject: Retry on EINTR from waitpid(2) This was reported by hovsater on IRC but I only saw it on my phone and I guess am missing logs for it. In any case the link to their patch is expired, so I wrote this. --- bin/qf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/qf.c b/bin/qf.c index afa7eced..d0d3acf4 100644 --- a/bin/qf.c +++ b/bin/qf.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -182,7 +183,9 @@ static void edit(struct Line line) { err(127, "%s", editor); } int status; - pid = waitpid(pid, &status, 0); + do { + pid = waitpid(pid, &status, 0); + } while (pid < 0 && errno == EINTR); if (pid < 0) err(1, "waitpid"); } -- cgit 1.4.1