Repositories / jai.git

jai.git

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

Branch

fix some typos in comments and strings

Author
David Mazieres <dm@uun.org>
Date
2026-03-27 22:04:39 -0700
Commit
a9e953f3fe804c0c8495c70195727e83e941cc58
fs.h
index 269ccb6..3c5aaac 100644
--- a/fs.h
+++ b/fs.h
@@ -43,7 +43,7 @@ contains(const path &dir, const path &subpath)
   return std::ranges::mismatch(dir, subpath).in1 == dir.end();
 }
 
-// True is target matches pattern (with * expanded)
+// True if target matches pattern (with * expanded)
 bool glob(std::string_view pattern, std::string_view target);
 
 // Compare paths component by component so subtrees are contiguous
jai.cc
index e29842b..f72db50 100644
--- a/jai.cc
+++ b/jai.cc
@@ -847,7 +847,7 @@ Config::parent_loop(pid_t pid, int stop_requests)
   };
   sigemptyset(&sa.sa_mask);
   if (sigaction(SIGCONT, &sa, nullptr))
-    syserr("sigcation(SIGCONT)");
+    syserr("sigaction(SIGCONT)");
 
   std::array<pollfd, 2> pollfds{pollfd{.fd = stop_requests, .events = POLLIN},
                                 pollfd{.fd = *sigfd, .events = POLLIN}};
@@ -907,11 +907,11 @@ try {
 
   prctl(PR_SET_NAME, "jai-init");
 
-  // Note: getpgid is technicalaly not signal safe, but disassembling
-  // glibc shows it doesn't do anything problematic other than maybe
-  // change errno.  Conceivably there could be weirdness performing
-  // lazy dynamic linking within a signal handler, so call getpgid at
-  // least once before setting the signal handler.
+  // Note: getpgid is technically not async-signal-safe, but
+  // disassembling glibc shows it doesn't do anything problematic
+  // other than maybe change errno (which we save/restore in the
+  // handler).  Call getpgid at least once before setting the signal
+  // handler to avoid any lazy dynamic linking in the signal handler.
   static pid_t my_pgid, main_child_pid;
   my_pgid = getpgid(0);
   main_child_pid = pid;