From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by sourceware.org (Postfix) with ESMTPS id B699A38515D9 for ; Thu, 19 May 2022 07:46:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org B699A38515D9 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=cygwin.com Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=cygwin.com Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MHo6Y-1o4BlR2dRW-00EsBH; Thu, 19 May 2022 09:46:07 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 3C62FA8089E; Thu, 19 May 2022 09:46:05 +0200 (CEST) Date: Thu, 19 May 2022 09:46:05 +0200 From: Corinna Vinschen To: Jun T Cc: cygwin@cygwin.com Subject: Re: killpg(pgid, 0) fails if the process is in the middle of spawnve() Message-ID: Reply-To: cygwin@cygwin.com Mail-Followup-To: Jun T , cygwin@cygwin.com References: <08B78336-7554-4ACA-80EF-F87C3C04C781@kba.biglobe.ne.jp> <0C6FFD9B-F723-4F8C-BDA9-A67A64EB71E0@kba.biglobe.ne.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <0C6FFD9B-F723-4F8C-BDA9-A67A64EB71E0@kba.biglobe.ne.jp> X-Provags-ID: V03:K1:ReckjfVIRxNzAozcxgIV/SPp9+EjDhnLlz3ftIJq0o37Bish0W7 9kzhkAPJqytDF+sC892lwTlEnePDtRtGOaDO6tqW4PMkXs1j1krB4s+6RHYJz0h2Sn5ENbn FdQ2FlUgM2RstFowHHvYjfl7Vi5tpMI8ovDvnE7LpmOY5SOnCfPTQUwkW7KMULjmCRvCTs6 i5jXOdL/z+vn0uCsAwsig== X-UI-Out-Filterresults: notjunk:1;V03:K0:QftJVYd57lc=:G4g457jFjth6cuazBt8Ihd hOZ9urFw+uRwHz3589PPr6rEsAC0nJDpjtZ5RbTyt2bR/Wybc5j+UyZBqxfHnvza3vi4JIe5l 8wtRNV/WgVD4wPC61U/CX/U1uJ0WKZiaqf8QhwoAngXGH60vQfRw77vcENCivG8g1Vl86MEsP UrzkgFMXECRC0WToz5I1HGHd83O+RjXysgMyfzn+SdY0bONWzW26fUKHlTzfxiBpBIaQDlCXq LhNaeEz2U4PHtWkzc0umKGsb5vs77tudEq6goBmPzNpOXHUM+Ew9aE/jC2c1GD841c8ZjsQyF G5yr2K42Sp8aHDzNpyWnX615Tz/9P+hMxiC6Hi7BwhhQSowJFQHUnT9kk5DHMwLpmGYtSRqcl up5tPq1ijtK24HfCl6WArZSTxRTDIZbokMs7DqjgPkgo7KlUBgmAPN+kevcXtsVY4z7fDtfG8 i2v2wSmVpz2ORGXY2gbmb6h1AGT/2ehnmCDCGoYKiIXsdr2ggLew5q2tMvrFcEXPO8WppNfVA hy32bfeBcp1+I1/phoWPdTKsjjsjt24m9ih8KKOZehDON23wjmT5oyjDL8PSWaic1nVMzsUdA Z9j1CwKmJ9LMJKDB589BTbGsVmnBwSWggvs0kIDo0+rt1zagLcXLtF2FhSoKfOwXzWt9FRJPo LYpx/W0rjNK1+N3JgxqLHmpoaCl3ui1c1DhGCpdOvpN26J4eYInPKfqTfcmtSAk50K2hf095z NqPfQ4Mv4pn7SeNjyk6ajoVv4+/4glcsJBWi437Shs3x2NYBDIrCCfdQaHQ= X-Spam-Status: No, score=-95.2 required=5.0 tests=BAYES_00, GOOD_FROM_CORINNA_CYGWIN, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_FAIL, SPF_HELO_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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, 19 May 2022 07:46:17 -0000 On May 19 13:51, Jun T wrote: > > > 2022/05/18 23:54, Corinna Vinschen wrote: > > > > For a start, can you try the above patch? > > Thanks for a quick response. The patch seems to solve the problem. > Of course there is a possibility that it happens with very low probability, > but I haven't get the problem by running 'cmd | less' many times, say > fifty times or so. > > I didn't notice any bad side effects, and I guess the probability is > very low if it ever happens (so not easy to detect it). > # I tried running 'ls | less' several times while running > # while true; do ps; done > # in another terminal, but didn't get duplicated processes. Great, thanks for testing. I'll push the patch as is for now. > PS: > I'm new to building cygwin1.dll by myself, and have a few questions: > (1) After make, I've manually copied new-cygwin1.dll to /bin/cygwin1.dll. > I didn't copy/install any other files. Is this OK? Yes. > (2) What are cygwin0.dll and cygwin1.dbg? The latter is a new cygwin1.dll > with debug info? cygwin0.dll is an intermediate stage during build, cygwin1.dbg is the debuginfo file. For quick debugging, you can just copy it alongside the DLL into /bin. > (3) Is there a simple way to build only new-cygwin1.dll (and anything > required by it), without building (or trying to build) unnecessary > things (especially documents)? configure --disable-doc Everything else is built unconditionally. If you tweak sources inside ${srcdir}/winsup/cygwin only, it's usually sufficient to rebuild inside ${builddir}/x86_64-pc-cygwin/winsup/cygwin only, unless you change the layout/size of data structures. A build from toplevel should be performed then. Thanks, Corinna