[ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.2
Corinna Vinschen
corinna-cygwin@cygwin.com
Mon Aug 19 14:03:00 GMT 2019
On Aug 19 21:49, Takashi Yano wrote:
> Hi Corinna,
>
> On Mon, 19 Aug 2019 12:39:56 +0200
> Corinna Vinschen wrote:
> > I uploaded a new Cygwin test release 3.1.0-0.2
>
> 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.
>
> 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
>
> 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
--
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190819/98d6ddc1/attachment.sig>
More information about the Cygwin
mailing list