diff options
author | Jo-Philipp Wich <jo@mein.io> | 2022-09-19 20:45:38 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2022-09-21 20:56:12 +0200 |
commit | e23b58afb198b06940fcff080501968297911974 (patch) | |
tree | f35e839414af33a0babdccb51b4fa5a542a12bf5 /lib.c | |
parent | 7fa59ce44b9347528b0e4e44ebcfb04a08479f3f (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.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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; } |