Browse Source

Plan 9 from Bell Labs 2005-01-21

David du Colombier 17 years ago
parent
commit
2f1514fa0b

+ 6 - 6
dist/replica/_plan9.db

@@ -195,7 +195,7 @@
 386/bin/dial/expect - 775 sys sys 1104122000 60081
 386/bin/dial/pass - 775 sys sys 1104122001 38814
 386/bin/dict - 775 sys sys 1104122001 187459
-386/bin/diff - 775 sys sys 1106107676 84031
+386/bin/diff - 775 sys sys 1106194001 84036
 386/bin/disk - 20000000775 sys sys 984788664 0
 386/bin/disk/dump9660 - 775 sys sys 1104122002 152246
 386/bin/disk/exsort - 775 sys sys 1104122002 60210
@@ -2847,7 +2847,7 @@ mail/lib/smtpd.conf.ext - 664 upas upas 1089299188 1032
 mail/lib/spam.rc - 775 upas upas 1063950954 400
 mail/lib/unspam.rc - 775 upas upas 1063950954 400
 mail/lib/validateaddress - 775 upas upas 1098803974 48
-mail/lib/validatesender - 775 upas upas 1102429113 1117
+mail/lib/validatesender - 775 upas upas 1106233741 1128
 mail/lib/white.starter - 664 upas upas 1067739606 326
 mail/queue - 20000000777 upas upas 953302652 0
 mail/tmp - 20000000777 upas upas 953302655 0
@@ -10288,11 +10288,11 @@ sys/src/cmd/samterm/icons.c - 664 sys sys 1014926592 1627
 sys/src/cmd/samterm/io.c - 664 sys sys 952627627 4226
 sys/src/cmd/samterm/main.c - 664 sys sys 1066572812 10009
 sys/src/cmd/samterm/menu.c - 664 sys sys 1045502822 6528
-sys/src/cmd/samterm/mesg.c - 664 sys sys 1014926592 12558
+sys/src/cmd/samterm/mesg.c - 664 sys sys 1106263089 12586
 sys/src/cmd/samterm/mkfile - 664 sys sys 1066572811 595
-sys/src/cmd/samterm/plan9.c - 664 sys sys 1014926592 4675
+sys/src/cmd/samterm/plan9.c - 664 sys sys 1106263089 4763
 sys/src/cmd/samterm/rasp.c - 664 sys sys 944961350 4433
-sys/src/cmd/samterm/samterm.h - 664 sys sys 1045502822 3730
+sys/src/cmd/samterm/samterm.h - 664 sys sys 1106263089 3750
 sys/src/cmd/samterm/scroll.c - 664 sys sys 1014926593 3302
 sys/src/cmd/samterm/syms - 664 sys sys 944961351 17698
 sys/src/cmd/scat - 20000000775 sys sys 964307379 0
@@ -12457,4 +12457,4 @@ usr/glenda/lib/profile - 664 glenda glenda 1105128663 890
 usr/glenda/readme.acme - 664 glenda glenda 1019860628 4753
 usr/glenda/readme.rio - 664 glenda glenda 1019860628 6370
 usr/glenda/tmp - 20000000775 glenda glenda 1018802620 0
-386/bin/diff - 775 sys sys 1106194001 84036
+386/bin/aux/samterm - 775 sys sys 1106280481 247878

+ 5 - 5
dist/replica/plan9.db

@@ -133,7 +133,7 @@
 386/bin/aux/posttek - 775 sys sys 1087442508 163239
 386/bin/aux/rdwr - 775 sys sys 1104121984 38303
 386/bin/aux/reboot - 775 sys sys 1104121984 60321
-386/bin/aux/samterm - 775 sys sys 1104121985 247786
+386/bin/aux/samterm - 775 sys sys 1106280481 247878
 386/bin/aux/searchfs - 775 sys sys 1104121985 89556
 386/bin/aux/sprog - 775 sys sys 1104121985 79349
 386/bin/aux/ssh_genkey - 775 sys sys 1045537957 194629
@@ -2847,7 +2847,7 @@ mail/lib/smtpd.conf.ext - 664 upas upas 1089299188 1032
 mail/lib/spam.rc - 775 upas upas 1063950954 400
 mail/lib/unspam.rc - 775 upas upas 1063950954 400
 mail/lib/validateaddress - 775 upas upas 1098803974 48
-mail/lib/validatesender - 775 upas upas 1102429113 1117
+mail/lib/validatesender - 775 upas upas 1106233741 1128
 mail/lib/white.starter - 664 upas upas 1067739606 326
 mail/queue - 20000000777 upas upas 953302652 0
 mail/tmp - 20000000777 upas upas 953302655 0
@@ -10288,11 +10288,11 @@ sys/src/cmd/samterm/icons.c - 664 sys sys 1014926592 1627
 sys/src/cmd/samterm/io.c - 664 sys sys 952627627 4226
 sys/src/cmd/samterm/main.c - 664 sys sys 1066572812 10009
 sys/src/cmd/samterm/menu.c - 664 sys sys 1045502822 6528
-sys/src/cmd/samterm/mesg.c - 664 sys sys 1014926592 12558
+sys/src/cmd/samterm/mesg.c - 664 sys sys 1106263089 12586
 sys/src/cmd/samterm/mkfile - 664 sys sys 1066572811 595
-sys/src/cmd/samterm/plan9.c - 664 sys sys 1014926592 4675
+sys/src/cmd/samterm/plan9.c - 664 sys sys 1106263089 4763
 sys/src/cmd/samterm/rasp.c - 664 sys sys 944961350 4433
-sys/src/cmd/samterm/samterm.h - 664 sys sys 1045502822 3730
+sys/src/cmd/samterm/samterm.h - 664 sys sys 1106263089 3750
 sys/src/cmd/samterm/scroll.c - 664 sys sys 1014926593 3302
 sys/src/cmd/samterm/syms - 664 sys sys 944961351 17698
 sys/src/cmd/scat - 20000000775 sys sys 964307379 0

+ 5 - 0
dist/replica/plan9.log

@@ -13262,3 +13262,8 @@
 1106152208 0 c rc/bin/patch/diff - 775 sys sys 1106151131 466
 1106152208 1 c sys/src/cmd/diff/main.c - 664 sys sys 1106151067 4325
 1106195417 0 c 386/bin/diff - 775 sys sys 1106194001 84036
+1106235025 0 c mail/lib/validatesender - 775 upas upas 1106233741 1128
+1106263831 0 c sys/src/cmd/samterm/mesg.c - 664 sys sys 1106263089 12586
+1106263831 1 c sys/src/cmd/samterm/plan9.c - 664 sys sys 1106263089 4763
+1106263831 2 c sys/src/cmd/samterm/samterm.h - 664 sys sys 1106263089 3750
+1106281836 0 c 386/bin/aux/samterm - 775 sys sys 1106280481 247878

+ 11 - 11
mail/lib/validatesender

@@ -27,17 +27,17 @@ if(~ $dom swtch.com && ~ $addr glenda && ! ~ $sysname olive)
 # Sites that we have to special case
 # Lucent only - use external network when mail from external domains
 # is delivered to us internally.  Assume that local domains are fine.
-netroot=/net
-if(~ $dom *.lucent.com lucent.com *.bell-labs.com bell-labs.com)
-	exit ''
-if(! ~ $sysname ethel)
-	exit ''
-if(~ $sysname ethel){
-	if(! test -d /net.alt/tcp)
-		import outside /net.alt
-	if(test -d /net.alt/tcp)
-		netroot=/net.alt
-}
+#netroot=/net
+#if(~ $dom *.lucent.com lucent.com *.bell-labs.com bell-labs.com)
+#	exit ''
+#if(! ~ $sysname ethel)
+#	exit ''
+#if(~ $sysname ethel){
+#	if(! test -d /net.alt/tcp)
+#		import outside /net.alt
+#	if(test -d /net.alt/tcp)
+#		netroot=/net.alt
+#}
 
 if(x=`{upas/smtp -p $netroot/tcp!$dom /dev/null $addr >[2=1] | 
 		tee >{sed 's/^/'$sysname' '$pid' /' >> /sys/log/smtpd.mx} |

+ 2 - 0
sys/src/cmd/samterm/mesg.c

@@ -16,6 +16,7 @@ uchar	indata[DATASIZE+1];	/* room for NUL */
 uchar	outdata[DATASIZE];
 short	outcount;
 int	hversion;
+int	exiting;
 
 void	inmesg(Hmesg, int);
 int	inshort(int);
@@ -291,6 +292,7 @@ inmesg(Hmesg type, int count)
 		break;
 
 	case Hexit:
+		exiting = 1;
 		outT0(Texit);
 		threadexitsall(nil);
 		break;

+ 5 - 0
sys/src/cmd/samterm/plan9.c

@@ -264,6 +264,11 @@ hostproc(void *arg)
 		i = 1-i;	/* toggle */
 		n = read(0, hostbuf[i].data, sizeof hostbuf[i].data);
 		if(n <= 0){
+			if(n==0){
+				if(exiting)
+					threadexits(nil);
+				werrstr("unexpected eof");
+			}
 			fprint(2, "samterm: host read error: %r\n");
 			threadexitsall("host");
 		}

+ 1 - 0
sys/src/cmd/samterm/samterm.h

@@ -84,6 +84,7 @@ extern Channel *plumbc;
 extern Channel *hostc;
 extern int	hversion;
 extern int	plumbfd;
+extern int	exiting;
 
 Rune	*gettext(Flayer*, long, ulong*);
 void	*alloc(ulong n);