summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/app_extract.c4
-rw-r--r--src/database.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/app_extract.c b/src/app_extract.c
index c2836da..22ef971 100644
--- a/src/app_extract.c
+++ b/src/app_extract.c
@@ -72,7 +72,7 @@ static int uvol_run(struct apk_ctx *ac, char *action, const char *volname, char
apk_err(out, "%s: uvol exec error: %s", volname, apk_error_str(r));
return r;
}
- waitpid(pid, &status, 0);
+ while (waitpid(pid, &status, 0) < 0 && errno == EINTR);
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
apk_err(out, "%s: uvol exited with error %d", volname, WEXITSTATUS(status));
return -APKE_UVOL;
@@ -109,7 +109,7 @@ static int uvol_extract(struct apk_ctx *ac, const char *volname, char *arg1, off
return r;
}
- waitpid(pid, &status, 0);
+ while (waitpid(pid, &status, 0) < 0 && errno == EINTR);
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
apk_err(out, "%s: uvol exited with error %d", volname, WEXITSTATUS(status));
return -APKE_UVOL;
diff --git a/src/database.c b/src/database.c
index f8dd440..3841464 100644
--- a/src/database.c
+++ b/src/database.c
@@ -1935,7 +1935,7 @@ int apk_db_run_script(struct apk_database *db, char *fn, char **argv)
execve(fn, argv, environment);
exit(127); /* should not get here */
}
- waitpid(pid, &status, 0);
+ while (waitpid(pid, &status, 0) < 0 && errno == EINTR);
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
apk_err(out, "%s: script exited with error %d", basename(fn), WEXITSTATUS(status));
return -1;