Propagate deferred exit status from main (#1912)

Previously s3fs always returned zero when the bucket did not mount.
Fixes #1911.
This commit is contained in:
Andrew Gaul 2022-02-23 10:09:12 +09:00 committed by GitHub
parent 305d660e39
commit 81ed2bd91e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4692,6 +4692,9 @@ int main(int argc, char* argv[])
// now passing things off to fuse, fuse will finish evaluating the command line args // now passing things off to fuse, fuse will finish evaluating the command line args
fuse_res = fuse_main(custom_args.argc, custom_args.argv, &s3fs_oper, NULL); fuse_res = fuse_main(custom_args.argc, custom_args.argv, &s3fs_oper, NULL);
if(fuse_res == 0){
fuse_res = s3fs_init_deferred_exit_status;
}
fuse_opt_free_args(&custom_args); fuse_opt_free_args(&custom_args);
// Destroy curl // Destroy curl