ps weirdness...
cygwin@kosowsky.org
cygwin@kosowsky.org
Tue Oct 22 00:39:00 GMT 2013
When I type 'ps', I get as expected the following processes:
PID PPID PGID WINPID TTY UID STIME COMMAND
18036 3188 18036 17792 pty0 1001 16:54:33 /usr/bin/ps
3188 1688 3188 3212 pty0 1001 06:59:16 /usr/bin/bash
1688 1 1688 1688 ? 1001 06:59:15 /usr/bin/mintty
2392 1 2392 2392 ? 1001 11:00:03 /usr/bin/ssh-agent
When I type 'ps | grep bash', about 2/3 of the time, I get:
3188 1688 3188 3212 pty0 1001 06:59:16 /usr/bin/bash
HOWEVER, about 1/3 of the time, I get:
16832 3188 17792 16832 pty0 1001 16:56:44 /usr/bin/bash
3188 1688 3188 3212 pty0 1001 06:59:16 /usr/bin/bash
And there is no bash process launched in the interim. Moreover, this second PID jumps around (both up and down) wildly rather than being constant or even relatively sequential.
In such cases, ps -W, similarly generates 2 bash processes:
3188 1688 3188 3212 pty0 1001 06:59:16 /usr/bin/bash
16460 0 0 16460 pty0 1001 17:44:29 C:\cygwin\bin\bash.exe
Even more interesting, when I type 'ps | grep ssh-agent', about 2/3 of the time, I get:
2392 1 2392 2392 ? 1001 11:00:03 /usr/bin/ssh-agent
HOWEVER, about 1/3 of the time, I get:
2392 1 2392 2392 ? 1001 11:00:03 /usr/bin/ssh-agent
19176 0 0 19176 pty0 1001 Dec 31 /usr/bin/ssh-agent
This makes no sense, since I rebooted the machine less than 24 hours
ago (and the date is correct). Again the PID jumps around wildly
though here (as opposed to the bash case), the stime remains stuck on
Dec 31, whereas in the 'grep bash' case the stime seems to correspond
to the time the 'ps' command is run.
Interestingly, in the 'grep ssh-agent' case, 'ps -W | grep ssh-agent', never seems to generate a spurious 2nd process (despite dozens of trials).
Note that grepping for mintty, gives the same behavior as for 'ssh-agent' -- including the spurious Dec 31 date.
So, what is going on here with ps (inconsistently) generating "phanton" processes?
Note: I am running the latest 17.25 x86-64 under Win7 on an Intel i5.
Jeff
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
More information about the Cygwin
mailing list