diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2017-10-21 13:10:36 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2017-10-21 13:10:36 -0400 |
commit | 4e38f139f92b8b3729f82c37f0904c2b77d3eb58 (patch) | |
tree | a10f9de054cbcd2176be7666e56e0ae660bebf84 /main.c | |
parent | 305f75468ead1f68aad3f3b5162f7437ad8dd732 (diff) | |
download | bfs-4e38f139f92b8b3729f82c37f0904c2b77d3eb58.tar.xz |
Report errors that occur when closing files
Otherwise we miss write errors that occur when flushing the cache.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -60,7 +60,9 @@ int main(int argc, char *argv[]) { ret = eval_cmdline(cmdline); } - free_cmdline(cmdline); + if (free_cmdline(cmdline) != 0 && ret == EXIT_SUCCESS) { + ret = EXIT_FAILURE; + } done: return ret; |