> static int
> reap(Dest *dp)
> {
> char exitsts[2*ERRMAX];
> + int n;
> - if (outstandingprocs(dp) && await(exitsts, sizeof exitsts) >= 0) {
> + if (outstandingprocs(dp) && (n = await(exitsts, sizeof exitsts-1)) >=
> 0) {
> + exitsts[n] = 0;
> notedeath(dp, exitsts);
> return 0;
> }
> return -1;
> }
>
> probably 2*ERRMAX is enough for await().
>
> I wonder why await() returns non-terminated string?
>
a better solution is to just use waitmsg (see wait(2)). the parsing rules and
sizing are
already implemented there.
- erik