summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-09-19 20:45:38 +0200
committerJo-Philipp Wich <jo@mein.io>2022-09-21 20:56:12 +0200
commite23b58afb198b06940fcff080501968297911974 (patch)
treef35e839414af33a0babdccb51b4fa5a542a12bf5 /lib.c
parent7fa59ce44b9347528b0e4e44ebcfb04a08479f3f (diff)
lib: uc_system(): retry waitpid() on EINTR
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index c67e703..51b99bf 100644
--- a/lib.c
+++ b/lib.c
@@ -2742,7 +2742,10 @@ uc_system(uc_vm_t *vm, size_t nargs)
}
}
- if (waitpid(cld, &rc, 0) < 0) {
+ while (waitpid(cld, &rc, 0) < 0) {
+ if (errno == EINTR)
+ continue;
+
fn = "waitpid";
goto fail;
}