i think this fix is correct; i'm not sure why tokenize didn't have a
problem walking a buffer it expects to be null terminated.
supermic% yesterday -d dial.c
diff /n/dump/2016/0520/sys/src/libc/9sys/dial.c /sys/src/libc/9sys/dial.c
209a210
> int n;
211c212,213
< if (outstandingprocs(dp) && await(exitsts, sizeof exitsts) >= 0) {
---
> if (outstandingprocs(dp) && (n = await(exitsts, sizeof exitsts)) >= 0) {
> exitsts[n] = 0;
supermic%
> can you spot the problem in reap() function in /sys/src/libc/9sys/dial.c?
> hint: in notedeath() there is a tokenize(exitsts, ...)
>
> static int
> reap(Dest *dp)
> {
> char exitsts[2*ERRMAX];
>
> if (outstandingprocs(dp) && await(exitsts, sizeof exitsts) >= 0) {
> notedeath(dp, exitsts);
> return 0;
> }
> return -1;
> }