From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: Date: Mon, 18 Dec 2006 11:40:37 -0500 From: "Russ Cox" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@cse.psu.edu> Subject: Re: [9fans] wait hang In-Reply-To: <5ff2e8b65c65f83c1d9ac6caefd67b1e@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5ff2e8b65c65f83c1d9ac6caefd67b1e@coraid.com> Topicbox-Message-UUID: f653e780-ead1-11e9-9d60-3106f5b1d025 > the kernel fix does indeed keep > ; for(i in `{seq 1 $n}){>/dev/null echo fu&} > ; for(i in `{seq 1 $n}){>/dev/null echo fu&} > from hanging. > > however, i think the fix to rc might be in error. if i do this > > #!/bin/rc > cmd1& > cmd2& > wait > > shouldn't that wait for both processes? for example, on an older > rc, from this script > > #/bin/rc > date > sleep 15 & > sleep 30 & > wait > date > > i get > > Mon Dec 18 10:57:43 EST 2006 > Mon Dec 18 10:58:13 EST 2006 > > whereas with the rc from friday, i get > > ; 8.out > broken! date ; sleep 15 & sleep 30 & wait ; date > Mon Dec 18 11:00:33 EST 2006 > Mon Dec 18 11:00:33 EST 2006 You're right. I forgot about "wait". I reverted the change to rc. Note that if you add "wait" to your hanging example it will not necessarily wait for all of the echos, only the first 128 or so. Russ