shithub: snarflog

Download patch

ref: 04dadac492a48f26e0f6872380767ac1f4d21632
parent: 4bc4f278c65d7e9f8e854ed411d7fb9ac43e7870
author: penny <penny@limitedideas.org>
date: Fri Nov 28 07:39:34 EST 2025

exit if our I/O hangs up

--- a/main.go
+++ b/main.go
@@ -79,9 +79,10 @@
 
 	go func() {
 		if err := go9p.ServeReadWriter(rw, rw, fid.Server()); err != nil {
-			fmt.Printf("failed to serve /mnt/snarflog: %v\n", err)
 			os.Exit(1)
 		}
+		// Might hate life less if we exit if our filesystem dies
+		os.Exit(1)
 	}()
 
 	plan9.Mount(fds[1], -1, "/mnt/snarflog", plan9.MREPL, "")
@@ -126,6 +127,7 @@
 			fmt.Printf("Failed to post server: %v\n", err)
 			os.Exit(1)
 		}
+		os.Exit(1)
 	}()
 
 	for {
--- a/mkfile
+++ b/mkfile
@@ -1,10 +1,10 @@
 BIN=/$objtype/bin
 
 TARGET=slog
-clean:V:
-	rm $TARGET
+
 default:V:
 	go build -o $TARGET main.go
 install:V: default
 	cp $TARGET $BIN/
-	
\ No newline at end of file
+clean:QV:
+	rm $TARGET
\ No newline at end of file
--