diff options
author | Bernd Schubert <bernd.schubert@fastmail.fm> | 2024-03-07 12:03:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-07 12:03:41 +0100 |
commit | a6a219f5344a5c09cec34416818342ac220a0df2 (patch) | |
tree | f15c5153163879291aeb5598d8a63424bb000ff0 /util/fusermount.c | |
parent | a6ac2ec12df545526b7cf92feb771e0a2bb1bbf3 (diff) | |
parent | aab146eea8877ee744a1b5a0da8bbbf31d14bad1 (diff) | |
download | libfuse-a6a219f5344a5c09cec34416818342ac220a0df2.tar.gz |
Merge pull request #901 from bsbernd/posix_spawn
Switch from fork to posix_spawn
Diffstat (limited to 'util/fusermount.c')
-rw-r--r-- | util/fusermount.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/util/fusermount.c b/util/fusermount.c index 06f5f56..5716c76 100644 --- a/util/fusermount.c +++ b/util/fusermount.c @@ -1454,7 +1454,7 @@ int main(int argc, char *argv[]) static int unmount = 0; static int lazy = 0; static int quiet = 0; - char *commfd; + char *commfd = NULL; int cfd; const char *opts = ""; const char *type = NULL; @@ -1462,14 +1462,15 @@ int main(int argc, char *argv[]) static const struct option long_opts[] = { {"unmount", no_argument, NULL, 'u'}, - // Note: auto-unmount deliberately does not have a short version. - // It's meant for internal use by mount.c's setup_auto_unmount. - {"auto-unmount", no_argument, NULL, 'U'}, {"lazy", no_argument, NULL, 'z'}, {"quiet", no_argument, NULL, 'q'}, {"help", no_argument, NULL, 'h'}, {"version", no_argument, NULL, 'V'}, {"options", required_argument, NULL, 'o'}, + // Note: auto-unmount and comm-fd don't have short versions. + // They'ne meant for internal use by mount.c + {"auto-unmount", no_argument, NULL, 'U'}, + {"comm-fd", required_argument, NULL, 'c'}, {0, 0, 0, 0}}; progname = strdup(argc > 0 ? argv[0] : "fusermount"); @@ -1501,6 +1502,9 @@ int main(int argc, char *argv[]) auto_unmount = 1; setup_auto_unmount_only = 1; break; + case 'c': + commfd = optarg; + break; case 'z': lazy = 1; break; @@ -1547,7 +1551,8 @@ int main(int argc, char *argv[]) if (!setup_auto_unmount_only && unmount) goto do_unmount; - commfd = getenv(FUSE_COMMFD_ENV); + if(commfd == NULL) + commfd = getenv(FUSE_COMMFD_ENV); if (commfd == NULL) { fprintf(stderr, "%s: old style mounting not supported\n", progname); |