From 910e3e2a0ebc13e98554831423e21112026a82be Mon Sep 17 00:00:00 2001 From: NRK Date: Tue, 31 Jan 2023 05:33:15 +0600 Subject: [PATCH] fstabinfo: deal with EINTR in waitpid call --- src/fstabinfo/fstabinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fstabinfo/fstabinfo.c b/src/fstabinfo/fstabinfo.c index 09cf5977..43ee822c 100644 --- a/src/fstabinfo/fstabinfo.c +++ b/src/fstabinfo/fstabinfo.c @@ -143,7 +143,7 @@ do_mount(struct ENT *ent, bool remount) err = posix_spawnp(&pid, argv[0], NULL, NULL, argv, environ); if (err) eerrorx("%s: posix_spawnp: %s", applet, strerror(err)); - waitpid(pid, &status, 0); + while (waitpid(pid, &status, 0) < 0 && errno == EINTR); if (WIFEXITED(status)) return WEXITSTATUS(status); else