Fix per-process errstr mess. Notes: Mon Dec 6 12:17:28 EST 2004 rsc $ what is the per-process errstr mess? Tue Dec 7 01:56:03 EST 2004 glenda 'win cmd-that-does-not-exist' outputs threadmain buffer error string instead of execproc one Reference: /n/sources/patch/applied/win-errstr Date: Mon Dec 20 18:59:35 CET 2004 Reviewed-by: rsc --- /acme/bin/source/win/main.c Mon Dec 20 18:59:35 2004 +++ /acme/bin/source/win/main.c Mon Dec 20 18:59:34 2004 @@ -625,8 +625,7 @@ cmd = estrstrdup("/bin/", av[0]); procexec(cpid, cmd, av); } - sendul(cpid, 0UL); - threadexits("can't exec"); + error("can't exec %s: %r", av[0]); } void @@ -647,10 +646,6 @@ do pid = recvul(cpid); while(pid == -1); - if(pid == 0){ - error("can't exec %s: %r", argv[0]); - threadexitsall("can't exec"); - } sprint(buf, "/proc/%d/notepg", pid); *notepg = open(buf, OWRITE); } --- /acme/bin/source/win/pipe.c Mon Dec 20 18:59:35 2004 +++ /acme/bin/source/win/pipe.c Mon Dec 20 18:59:35 2004 @@ -75,7 +75,7 @@ for(;;){ t = realloc(t, k+8192+2); if(t == nil) - error("win: alloc failed: %r\n"); + error("alloc failed: %r\n"); n = read(snarffd, t+k, 8192); if(n <= 0) break;