From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15245 invoked by alias); 19 Aug 2019 14:01:19 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 15041 invoked by uid 89); 19 Aug 2019 14:01:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-101.5 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=1930, H*F:D*cygwin.com X-HELO: mout.kundenserver.de Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.126.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 19 Aug 2019 14:00:59 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MFsIZ-1i2iEI0KGF-00HPic for ; Mon, 19 Aug 2019 16:00:41 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 9AB26A80690; Mon, 19 Aug 2019 16:00:40 +0200 (CEST) Date: Mon, 19 Aug 2019 14:03:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.2 Message-ID: <20190819140040.GM11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <20190819214907.05466c00d626590591e30c79@nifty.ne.jp> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="lgDpGT5NbMPMciux" Content-Disposition: inline In-Reply-To: <20190819214907.05466c00d626590591e30c79@nifty.ne.jp> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-08/txt/msg00277.txt.bz2 --lgDpGT5NbMPMciux Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 1649 On Aug 19 21:49, Takashi Yano wrote: > Hi Corinna, >=20 > On Mon, 19 Aug 2019 12:39:56 +0200 > Corinna Vinschen wrote: > > I uploaded a new Cygwin test release 3.1.0-0.2 >=20 > I tested it in a short time and confirmed the bugs I reported recently > have been fixed. Thanks for testing! > One small thing I found is as follows. >=20 > Result of "ps | cat" in recent cygwin including this test release: > $ ps | cat > PID PPID PGID WINPID TTY UID STIME COMMAND > 1930 1929 1930 7940 pty0 197609 21:32:53 /usr/bin/= bash > 1942 1930 1941 6612 pty0 197609 21:33:14 /usr/bin/= bash > 1941 1930 1941 1900 pty0 197609 21:33:14 /usr/bin/= ps > 1929 1 1929 6644 ? 197609 21:32:53 /usr/bin/= mintty >=20 > Expected result: > $ ps | cat > PID PPID PGID WINPID TTY UID STIME COMMAND > 1930 1929 1930 7940 pty0 197609 21:32:53 /usr/bin/= bash > 1942 1930 1941 6612 pty0 197609 21:33:14 /usr/bin/= cat > 1941 1930 1941 1900 pty0 197609 21:33:14 /usr/bin/= ps > 1929 1 1929 6644 ? 197609 21:32:53 /usr/bin/= mintty As far as I can tell this is not a bug. I added debug output and found that ps grabs the process list *before* bash execve's into cat. So at the time ps gets the process list, process 1942 in your example is actually still bash. If you call procps, which is slower than Cygwin's own ps, you tend to see cat more often in this scenario. Corinna --=20 Corinna Vinschen Cygwin Maintainer --lgDpGT5NbMPMciux Content-Type: application/pgp-signature; name="signature.asc" Content-length: 833 -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl1aq4gACgkQ9TYGna5E T6AoTQ//TJv4jb6d6kgLsgULuCv1SVF0nPACZcZ71HCbjVVC/HZiLr6hfHG9TXXi 7p5zehlPlYBCwiaWCo2d/RtQOmHtxveH4aK5UD8Z1ackmc4a6fsP1oroQYlOwFXg a0drZqFf+tHR40QUsGF9+6CleehLUsSkAjaFxoC5tNCKYgBOfCWASLlInMia3fG5 sWE1dCHoCRfp7YWYzzkO2uvam1tkm8Szc8GTXziwHcoJDFXCalnqaxzjQw2jx+v4 AuUFil993UxWuk83MaqY0bjTN/Ue/9p+xnaN48ZJgztiz9+D0oA/v3jrwaP+pJom ar8rRnDljAt5pa4Y0ETa11y9YwcAJGxONp75UwjN7Hp91rc0anQQDq3FoHC2NH09 5+P1u75q6VBMjSQ7dsCYpSVt2b7TDTeuSoe3txdTEF7/Am3uu7ADIbEifOz3O0Zl X8iRVZH0oKFW+ZGNhriqW5THi9uFGTYZc/m7ZlJw+OcjuBvOaZ88uLA8TRGLeIx8 KTS7gZIN6SGlhMrY5muWLP55GNqXsqRle9nwYwd2F3Whq7VGSdIEQdYYPkC0hbD8 8Zh5OuOTjGNUO8jI2VenbfIsZUPzDvN5f66oON/CsWD//qXk/ChTIiy5nHK3Z9wI kkXHTw/jiISAezWaK3kpwXleJIk0JMhr6KVFT+fRsutzBmkwQnQ= =RZQl -----END PGP SIGNATURE----- --lgDpGT5NbMPMciux--