ps weirdness...

Anthony Geoghegan anthony.geoghegan@gmail.com
Thu Oct 24 11:22:00 GMT 2013


I was intrigued by Jeff's post so I tried a couple of experiments of
my own and was able to duplicate the same behaviour - including the
bash process being shown as a Windows process - on my Cygwin
installation. The only difference was that I was getting Jan 1 instead
of Dec 31 for the STIME.

FWIW, I'm running 32-bit version of Cygwin on 64-bit Windows 7 and can
supply the output of cygcheck if it's useful. Also, I started my
Cygwin shell yesterday so "Oct 23" is the correct STIME for the bash
and ssh-agent processes.

Thanks, Corinna, for the explanation about how piping to grep
sometimes shows how the bash process forks to start the grep process.
However, I'm curious as to why there's also a duplicate ssh-agent
process every now and again.

Regards,
Anthony


$ while true; do date; ps -W | grep ssh-agent; sleep .3; echo; done

Thu, Oct 24, 2013 10:23:58 AM
      948       1     948        948  ?       12665   Oct 23 /usr/bin/ssh-agent

Thu, Oct 24, 2013 10:23:58 AM
      948       1     948        948  ?       12665   Oct 23 /usr/bin/ssh-agent
     5112       0       0       5112  pty0    12665   Jan  1 /usr/bin/ssh-agent

Thu, Oct 24, 2013 10:23:59 AM
      948       1     948        948  ?       12665   Oct 23 /usr/bin/ssh-agent
     4708       0       0       4708  pty0    12665   Jan  1 /usr/bin/ssh-agent

Thu, Oct 24, 2013 10:23:59 AM
      948       1     948        948  ?       12665   Oct 23 /usr/bin/ssh-agent

Thu, Oct 24, 2013 10:24:00 AM
      948       1     948        948  ?       12665   Oct 23 /usr/bin/ssh-agent


$ date; ps -W | grep bash
Thu, Oct 24, 2013 10:46:13 AM
     5228    4688    5228       5428  pty0    12665   Oct 23 /usr/bin/bash
     6708       0       0       6708  pty0    12665 10:46:13
C:\cygwin\bin\bash.exe

$ date; ps -W | grep bash
Thu, Oct 24, 2013 10:46:29 AM
     5228    4688    5228       5428  pty0    12665   Oct 23 /usr/bin/bash
     5492    5228    5228       5492  pty0    12665 10:46:29 /usr/bin/bash

$ date; ps -W | grep bash
Thu, Oct 24, 2013 10:46:32 AM
     5228    4688    5228       5428  pty0    12665   Oct 23 /usr/bin/bash
     7156       0       0       7156  pty0    12665 10:46:33
C:\cygwin\bin\bash.exe

$ date; ps -W | grep bash
Thu, Oct 24, 2013 10:46:34 AM
     5228    4688    5228       5428  pty0    12665   Oct 23 /usr/bin/bash
     7380       0       0       7380  pty0    12665 10:46:35
C:\cygwin\bin\bash.exe

--
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