delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/01/15/08:32:21

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Fri, 15 Jan 2010 14:31:57 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: ps -eaf not listing all server processes on Windows Server 2008
Message-ID: <20100115133157.GA4977@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <loom DOT 20100115T135134-587 AT post DOT gmane DOT org>
MIME-Version: 1.0
In-Reply-To: <loom.20100115T135134-587@post.gmane.org>
User-Agent: Mutt/1.5.20 (2009-06-14)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

On Jan 15 13:04, Bengt Albjerg wrote:
> Using Cygwin 1.7.1-1 on Windows Server 2008. Using ps -eaf. I need a listing of
> all server processes, but on Windows Server 2008 and Cygwin 1.7.1-1 you can only
> get a list of the processes, owned by you and not all servers processes. This is
> a new behavior.
> Is it possiple to get all the servers processes listed with ps on Windows Server
> 2008?

That's contrary to what I see.  Cygwin 1.7 introduced a new way to keep
track of all Cygwin processes, even if they are running under another
user account and in another session.  Cygwin 1.5.x was not able to do
that starting with Windows Server 2003.

Consequentially, when running Cygwin 1.7, I see something like this:

$ ps -ef
     UID     PID    PPID TTY     STIME COMMAND
 corinna    1664       1 con  14:23:49 /usr/bin/tcsh
cyg_serv    1052       1   ?  14:23:55 /usr/bin/cygrunsrv
cyg_serv    3392    1052   ?  14:23:55 /usr/sbin/sshd
 corinna    3208       1 con  14:23:57 /usr/bin/tcsh
 corinna     936    1664 con  14:24:28 /usr/bin/ps

As you can imagine, the processes running under the cyg_server account
are services running in session 0, while my own processes are running
in the GUI session 2.  I see the same output, regardless of running
under UAC or in an elevated shell.

Unless, of course, the processes are running under another Cygwin DLL.
Processe trees running under different Cygwin DLLs are isolated against 
each others.  They don't share any common IPC objects.

As for `ps -W' output, that's still subject to Windows security
considerations.  If you run it in a UAC-controlled shell or under a
non-privileged account, you can only see the processes running in your
own session.  If you run it in an elevated shell, you'll see all
processes.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019