This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] TEST: Cygwin 3.1.0-0.2


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

Attachment: signature.asc
Description: PGP signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]