From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from conssluserg-02.nifty.com (conssluserg-02.nifty.com [210.131.2.81]) by sourceware.org (Postfix) with ESMTPS id 3F27F385840D for ; Thu, 13 Jan 2022 23:52:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3F27F385840D Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=nifty.ne.jp Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=nifty.ne.jp Received: from Express5800-S70 (ae233132.dynamic.ppp.asahi-net.or.jp [14.3.233.132]) (authenticated) by conssluserg-02.nifty.com with ESMTP id 20DNqKML009680 for ; Fri, 14 Jan 2022 08:52:20 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com 20DNqKML009680 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.ne.jp; s=dec2015msa; t=1642117940; bh=kvolE6jh/z5inx37v/JOLn5PSW7P/bR3S08jZGnrq2A=; h=Date:From:To:Subject:In-Reply-To:References:From; b=Bo3U6oCl4XHwXOm3+KnNRmEiCbLro/ZN9ypQCcpuZzAXg2jcQSr8xWQFOAs5PUpUl wgDFYI2ZLfDyTtke7Hgww05bCKBN7Wctd5TR005TPzPk1fVWnvQCGsnn2A0+AgHO3K ToP6IDKwgwlkO3FPbBqE2OoK9/sNkU6eCOx+Ll3DvpQleYRZXMpr6GqQMvMLG8Qwmi 8B/RSFcpdUvb7w4MUUkAwBCJZ3AfE+k7EcSElFwCfopN3skC8pvJr92/ozcl6ZzyE9 bwvoY7K920guwac9yHzTGNUZR2gSEMk4Nh0PxuDPPqOAfEFU5/0Kj0SIO8Z+/fVVi2 2LWFN7EuR8V9A== X-Nifty-SrcIP: [14.3.233.132] Date: Fri, 14 Jan 2022 08:52:27 +0900 From: Takashi Yano To: cygwin@cygwin.com Subject: Re: proc_waiter: error on read of child wait pipe 0x0, Win32 error 6 Message-Id: <20220114085227.c044e8735fb5d92e341d0b84@nifty.ne.jp> In-Reply-To: <9b20c19a-b075-1dd3-d9f3-8cf53c51b1e5@gmail.com> References: <9b20c19a-b075-1dd3-d9f3-8cf53c51b1e5@gmail.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_NUMSUBJECT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Jan 2022 23:52:37 -0000 On Wed, 12 Jan 2022 07:41:41 +0100 Marco Atzeri wrote: > On 12.01.2022 07:27, Jay K wrote: > > Ok, here is a small demonstration of the problem. > > > > #include > > #include > > #include > > > > unsigned __stdcall thread(void* p) > > { > > unsigned i; > > for (i = 0; i < 100; ++i) > > system("./a.exe"); > > return 0; > > } > > > > int main() > > { > > unsigned i; > > HANDLE threads[100] = {0}; > > FILE* f = fopen("a.c", "w"); > > fprintf(f, "int main() { return 0; }\n"); > > fclose(f); > > > so you are mixing Cygwin and Windows calls ? > That is looking for trouble. > > Or it is a tentative to produce a test case ? I found that the same happens even with pthread rather than win32 thread functions. #include #include void *thread(void *p) { system("true"); return NULL; } int main() { int i; pthread_t threads[2]; for (i = 0; i < 2; i++) pthread_create(&threads[i], NULL, thread, NULL); for (i = 0; i < 2; i++) pthread_join(threads[i], NULL); return 0; } Executing above code results in hang with message: 0 [waitproc] a 786 proc_waiter: error on read of child wait pipe 0x0, Win32 error 6 -- Takashi Yano