summaryrefslogtreecommitdiff
path: root/archival/libarchive
diff options
context:
space:
mode:
authorDenys Vlasenko2013-02-28 16:38:25 +0100
committerDenys Vlasenko2013-02-28 16:38:25 +0100
commit577235dee826eed86d76b0d4ef866297a20ecd55 (patch)
treea68b8e185ca6c4678725c749a13ba892bbb2e08f /archival/libarchive
parent7794c21daf452912275f0f51d6edd4614c43eccf (diff)
downloadbusybox-577235dee826eed86d76b0d4ef866297a20ecd55.zip
busybox-577235dee826eed86d76b0d4ef866297a20ecd55.tar.gz
code shrink in check_errors_in_children()
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'archival/libarchive')
-rw-r--r--archival/libarchive/open_transformer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/archival/libarchive/open_transformer.c b/archival/libarchive/open_transformer.c
index dae04aa..4e44a87 100644
--- a/archival/libarchive/open_transformer.c
+++ b/archival/libarchive/open_transformer.c
@@ -34,6 +34,7 @@ void check_errors_in_children(int signo)
if (!signo) {
/* block waiting for any child */
if (wait(&status) < 0)
+//FIXME: check EINTR?
return; /* probably there are no children */
goto check_status;
}
@@ -41,14 +42,18 @@ void check_errors_in_children(int signo)
/* Wait for any child without blocking */
for (;;) {
if (wait_any_nohang(&status) < 0)
+//FIXME: check EINTR?
/* wait failed?! I'm confused... */
return;
check_status:
- if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
+ /*if (WIFEXITED(status) && WEXITSTATUS(status) == 0)*/
+ /* On Linux, the above can be checked simply as: */
+ if (status == 0)
/* this child exited with 0 */
continue;
- /* Cannot happen?
- if (!WIFSIGNALED(status) && !WIFEXITED(status)) ???; */
+ /* Cannot happen:
+ if (!WIFSIGNALED(status) && !WIFEXITED(status)) ???;
+ */
bb_got_signal = 1;
}
}