summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-06-18 00:32:14 +0200
committerNatanael Copa <ncopa@alpinelinux.org>2017-06-18 00:32:14 +0200
commit739e9c3926abf269c65c1f9bf50fbe732b3f55d8 (patch)
tree16fde288faa5560bdafbda8d19f1df76729ae95e /main.c
parentf7e0065d61c788e2e3a80d6569150c54deb4099f (diff)
downloadaports-cache-739e9c3926abf269c65c1f9bf50fbe732b3f55d8.tar.bz2
aports-cache-739e9c3926abf269c65c1f9bf50fbe732b3f55d8.tar.xz
catch exit status of shell
Diffstat (limited to 'main.c')
-rw-r--r--main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.c b/main.c
index 23de13b..5af6663 100644
--- a/main.c
+++ b/main.c
@@ -37,7 +37,7 @@ int main(int argc, char *argv[])
const char *cachefile = ".aports.cache.yaml";
char dirpath_buf[PATH_MAX];
char *dirpath = dirpath_buf;
- int dirfd;
+ int dirfd, rc;
char *shell_argv[] = {"/bin/sh", NULL};
@@ -83,9 +83,9 @@ int main(int argc, char *argv[])
if (verbose)
printf("updating cache for %s\n", dirpath);
- aports_cache_refresh(dirfd, cachefile, shell_argv);
+ rc = aports_cache_refresh(dirfd, cachefile, shell_argv);
close(dirfd);
- return 0;
+ return rc;
}