From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 18 Dec 2006 15:06:36 -0500 From: "Russ Cox" To: "erik quanstrom" Subject: Re: [9fans] wait hang In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Cc: 9fans@cse.psu.edu Topicbox-Message-UUID: f6693f36-ead1-11e9-9d60-3106f5b1d025 > since 20 is much less than 128, this can't be the kernel. i think the > problem is in the discarded wait messages here: rc/plan9.c/^Waitfor Where do you see discarded wait messages? > int > Waitfor(int pid, int) > { > thread *p; > Waitmsg *w; > char errbuf[ERRMAX]; > > while((w = wait()) != nil){ > if(w->pid==pid){ > setstatus(w->msg); > free(w); > return 0; > } > for(p = runq->ret;p;p = p->ret) > if(p->pid==w->pid){ > p->pid=-1; > strcpy(p->status, w->msg); > } This loop is trying to save the information about the wait message. But it doesn't seem to get consulted anywhere, and I have never understood why that particular linked list is the one to be looking through. Russ