shithub: gridchat

Download patch

ref: c21b11beff355c7c5d664b07e446d2573ac384ba
parent: a2c5233f86e4ca0802952ac60b075091e3675f3f
author: grobe0ba <grobe0ba@tcp80.org>
date: Sun Apr 13 05:58:45 EDT 2025

add newsrv

--- a/mkfile
+++ b/mkfile
@@ -19,5 +19,7 @@
 	for (i in $TARG)
 		mk $MKFLAGS $i.install
 	cp chat $home/bin/rc/chat
+	cp newsrv $home/bin/rc/newsrv
+
 
 
--- a/newsrv
+++ b/newsrv
@@ -1,12 +1,12 @@
-#!/bin/rc -x
+#!/bin/rc
 
 rfork ens
 
 <[3]/srv/clone{
-	id=`{<[0=3]read}
-	<[3=]@{ # close the clone fd
+	d=`{<[0=3]read}
+	<[3=0]@{
 		rfork n
-		bind -c /srv/$id /srv
-		rc -c $*
+		bind -c /srv/$d /srv
+		exec rc -c $*
 	}
 }
--