fstabinfo: deal with EINTR in waitpid call

This commit is contained in:
NRK 2023-01-31 05:33:15 +06:00 committed by William Hubbs
parent 5f04dcc951
commit 910e3e2a0e

View File

@ -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