5
_wait(int n, char *buf)
14
if(tokenize(buf, fld, nelem(fld)) != nelem(fld)){
15
werrstr("couldn't parse wait message");
19
w = malloc(sizeof(Waitmsg)+l);
22
w->pid = atoi(fld[0]);
23
w->time[0] = atoi(fld[1]);
24
w->time[1] = atoi(fld[2]);
25
w->time[2] = atoi(fld[3]);
26
w->msg = (char*)&w[1];
27
memmove(w->msg, fld[4], l);
36
return _wait(await(buf, sizeof buf-1), buf);
44
return _wait(awaitnohang(buf, sizeof buf-1), buf);
52
return _wait(awaitfor(pid, buf, sizeof buf-1), buf);