[ARVADOS] updated: 75496f54ac81f6bb280aab3bd5b1cff72701acbb
git at public.curoverse.com
git at public.curoverse.com
Mon Feb 24 16:52:50 EST 2014
Summary of changes:
sdk/python/bin/arv-mount | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
via 75496f54ac81f6bb280aab3bd5b1cff72701acbb (commit)
via ba64c04f9340013d25138b40b92e51e4ad5bacd8 (commit)
from 819757ca4018b20b4309d1d2d1b94d17cfee088c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 75496f54ac81f6bb280aab3bd5b1cff72701acbb
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Feb 24 13:49:13 2014 -0800
Consume all arguments after arv-mount --exec, and fork subprocess
without a shell to avoid double shell expansion.
diff --git a/sdk/python/bin/arv-mount b/sdk/python/bin/arv-mount
index e619b5c..2424979 100755
--- a/sdk/python/bin/arv-mount
+++ b/sdk/python/bin/arv-mount
@@ -9,11 +9,18 @@ if __name__ == '__main__':
# Handle command line parameters
parser = argparse.ArgumentParser(
- description='Mount Keep data under the local filesystem.')
+ description='Mount Keep data under the local filesystem.',
+ epilog="""
+Note: When using the --exec feature, you must either specify the
+mountpoint before --exec, or mark the end of your --exec arguments
+with "--".
+""")
parser.add_argument('mountpoint', type=str, help="""Mount point.""")
parser.add_argument('--collection', type=str, help="""Collection locator""")
parser.add_argument('--debug', action='store_true', help="""Debug mode""")
- parser.add_argument('--exec', type=str, help="""Mount, run a command, then unmount and exit""", dest="ex")
+ parser.add_argument('--exec', type=str, nargs=argparse.REMAINDER,
+ dest="exec_args", metavar=('command', 'args', '...', '--'),
+ help="""Mount, run a command, then unmount and exit""")
args = parser.parse_args()
@@ -38,7 +45,7 @@ if __name__ == '__main__':
# Initialize the fuse connection
llfuse.init(operations, args.mountpoint, opts)
- if args.ex:
+ if args.exec_args:
t = threading.Thread(None, lambda: llfuse.main())
t.start()
@@ -46,7 +53,7 @@ if __name__ == '__main__':
operations.initlock.wait()
try:
- rc = subprocess.call(args.ex, shell=True)
+ rc = subprocess.call(args.exec_args, shell=False)
except:
rc = 255
finally:
commit ba64c04f9340013d25138b40b92e51e4ad5bacd8
Author: Tom Clegg <tom at curoverse.com>
Date: Mon Feb 24 13:25:33 2014 -0800
Use fusermount -z to force detach and avoid hanging on exit.
diff --git a/sdk/python/bin/arv-mount b/sdk/python/bin/arv-mount
index 0cab824..e619b5c 100755
--- a/sdk/python/bin/arv-mount
+++ b/sdk/python/bin/arv-mount
@@ -50,7 +50,7 @@ if __name__ == '__main__':
except:
rc = 255
finally:
- subprocess.call(["fusermount", "-u", args.mountpoint])
+ subprocess.call(["fusermount", "-u", "-z", args.mountpoint])
exit(rc)
else:
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list