Repositories / jai.git

jai.git

Clone (read-only): git clone http://git.guha-anderson.com/git/jai.git

Branch

nits

Author
David Mazieres <dm@uun.org>
Date
2026-03-16 22:55:53 -0700
Commit
908fb93fb2cf5839baa5245f9b968579841835e6
jai.1.md
index 5b00871..6f62c5c 100644
--- a/jai.1.md
+++ b/jai.1.md
@@ -75,7 +75,7 @@ series of lines of the form "*option* [*value*]".  *option* can be any
 long command-line option without the leading `--`, for example:
 
     conf default.conf
-    casual
+    mode casual
     dir /local/build
     mask Mail
 
@@ -89,7 +89,7 @@ commands.  For instance, you might create a file `python.conf` with
 the following:
 
     conf default.conf
-    strict
+    mode strict
     dir /home/user/venv
     name python
     command source /home/user/venv/bin/activate; "$0" "$@"
jai.cc
index 3c58862..4a3e952 100644
--- a/jai.cc
+++ b/jai.cc
@@ -507,11 +507,9 @@ Config::unmount()
     ;
 
   auto runuser = path(kRunRoot) / user_;
-  for (const char *ext : {".home", ".tmp"}) {
-    auto mp = runuser / cat(sandbox_name_, ext);
-    umount2(mp.c_str(), UMOUNT_NOFOLLOW);
-    unlinkat(run_jai_user(), mp.filename().c_str(), AT_REMOVEDIR);
-  }
+  auto mp = runuser / cat(sandbox_name_, ".home");
+  umount2(mp.c_str(), UMOUNT_NOFOLLOW);
+  unlinkat(run_jai_user(), mp.filename().c_str(), AT_REMOVEDIR);
 
   unlinkat(run_jai_user(), ".lock", 0);
   lock.reset();
@@ -797,7 +795,7 @@ do_main(int argc, char **argv)
       R"(Use FILE as configuration file (relative to ~/.jai)
 default: CMD.conf or default.conf if CMD.conf does not exist)",
       "FILE");
-  (*opts)("--help", [] { usage(1); });
+  (*opts)("--help", [] { usage(0); });
   (*opts)("--version", version, "Print copyright and version then exit");
   option_help = opts->help();