X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=1.4 required=5.0	tests=BAYES_20,RCVD_IN_BRBL_LASTEXT,RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
Date: Sat, 15 Dec 2012 22:46:24 -0500 (EST)
From: Paul Townsend <aab@expert.ics.purdue.edu>
Message-Id: <201212160346.qBG3kOEo007681@expert.ics.purdue.edu>
To: cygwin@cygwin.com
Cc: aab@purdue.edu
Subject: ps questions --
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

In the

http://sourceware.org/ml/cygwin/2009-05/msg00477.html

message, I found

- Two changes in the `ps -W' output.  `ps -W' now prints all processes on
  the machine when running under an (elevated) administrator account,
  not only the processes in the current session.

Shouldn't the above restriction be documented in the `ps' man page?

Question1 - why the "administrative" restriction?  The normal user seems
to be able to run the Task Manager as him/herself and all of the running
processes are listed.  Is there a silent privilege escalation there
somewhere in the Task Manager process that allows the "full" listing?
I do note that the Task Manager seems to be able to kill just about any
process.

Question2 - the UID of the Windows processes is listed as 0 in the
`ps -W' output so is there a way to acquire and print it?  Task Manager
does know the owner so there must be a Windows function to get it.

Question3 - the PPID of the Windows process is listed as 0 also.  I did
find some functions at Microsoft that could be used for that purpose.
Are they available within the Cygwin code?

I reference "Task Manager" but, unfortunately, its output is not easily
parsed (:@{).

--  Thanks,
--    Paul Townsend

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

