Vista + cygwin basics
Charles Wilson
cygwin@cwilson.fastmail.fm
Sat Apr 19 18:48:00 GMT 2008
One odd thing I've noticed. (well, two, really, but I suspect they are
related).
Here is the output of 'ps -eaf' from a regular user (not a member of
Administrators):
$ ps -eaf
UID PID PPID TTY STIME COMMAND
ME 5408 1 ? 01:44:16 /usr/bin/ssh-agent
ME 5712 1 con 10:05:24 /usr/bin/rxvt
ME 2144 5712 0 10:05:24 /usr/bin/bash
ME 1172 2144 0 10:08:28 /usr/bin/ssh
ME 3180 1 con 13:24:19 /usr/bin/rxvt
ME 5160 3180 1 13:24:19 /usr/bin/bash
ME 3060 5160 1 14:17:08 /usr/bin/ps
Here is a *simultaneous* result, on the same machine, but from a shell
that was launched via 'run as administrator'
$ ps -eaf
UID PID PPID TTY STIME COMMAND
SYSTEM 5392 1 ? Apr 18 /usr/bin/cygrunsrv
SYSTEM 6108 5392 ? Apr 18 /usr/sbin/cygserver
SYSTEM 2460 1 ? Apr 18 /usr/bin/cygrunsrv
SYSTEM 4780 2460 ? Apr 18 /usr/sbin/syslog-ng
cyg_serv 2948 1 ? Apr 18 /usr/bin/cygrunsrv
cyg_serv 3772 2948 ? Apr 18 /usr/sbin/inetd
cyg_serv 4500 1 ? Apr 18 /usr/bin/cygrunsrv
cyg_serv 5036 4500 ? Apr 18 /usr/sbin/sshd
ME 3804 1 ? 01:09:40 /usr/bin/ssh-agent
ME 2420 1 ? 14:00:38 /usr/bin/ssh-agent
Administ 4764 1 con 14:17:20 /usr/bin/rxvt
Administ 3836 4764 0 14:17:21 /usr/bin/bash
Administ 1076 3836 0 14:17:27 /usr/bin/ps
Note that these two program lists (which should both list ALL cygwin
programs run by ANY user, and should be identical) are actually
completely disjoint. There is no PID that appears in both lists.
The other issue is related, I think. I'm using keychain from my
~/.bashrc, so it should start an ssh-agent if none is running, and then
save that PID to a file. Then any new shell can check for the PID in
that file, contact the exising ssh-agent, and continue.
Notice in the above lists I have multiple ssh-agents running. This is
because as long as I have one window owned by ME open, I can open other
windows and they will continue to access the same ssh-agent, just as
expected. However, if I close all windows owned by ME, then if I open a
new window, it somehow can't contact the original ssh-agent, and starts
another one. (But note: I do NOT stop ALL cygwin processes between these
two events: obviously the old ssh-agent is still running, and the
various daemons are running under cyg_server and SYSTEM, and the
'administrator' bash shell is still running)
It seems like there is some issue with the various processes
communicating with each other. Both the Administrator user, and the
ME user, have 'server' in their CYGWIN variables. There is no global
CYGWIN variable setting.
cygserver is running under SYSTEM, not a special privileged user.
Does anybody know what's going on here?
--
Chuck
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list