From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3c88b8bfb5216d40c70392c084358983@coraid.com> From: erik quanstrom Date: Tue, 19 Dec 2006 22:55:09 -0500 To: rsc@swtch.com, quanstro@coraid.com, 9fans@cse.psu.edu Subject: Re: [9fans] wait hang MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Cc: Topicbox-Message-UUID: f6b80206-ead1-11e9-9d60-3106f5b1d025 there's a version of rc on sources (/n/sources/contrib/quanstro/rc-wait.tbz) that keeps careful track of waits so "wait $pid" should be dependable, at least in the basic approach, i did minimal minimal testing of the details. there is somewhat verbose information printed along these lines: ; sleep & sleep & sleep & sleep waitqadd(772665) waitqadd(772666) waitqadd(772667) waitqadd(772668) waitfor 772668 w->pid 772668 waitqrm(772668) Xreturn i=0; p 205256, i=1 broken! wait 772665 waitfor 772665 w->pid 772667 w->pid 772666 w->pid 772665 waitqrm(772665) Xreturn i=0; p 205256, i=1 broken! wait 772666 waitfor 772666 Xreturn i=0; p 205256, i=1 broken! this output can be supressed by redefining the wdebug macro in exec.h. the previous case of ; sleep $longtime & ; echo&echo&echo& ; wait $apid should illustrate the difference. - erik