X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org X-Mail-Handler: Dyn Standard SMTP by Dyn X-Report-Abuse-To: abuse AT dyndns DOT com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/9p5FsUMqAsj+vO/QPoXxB Date: Sun, 16 Dec 2012 00:15:44 -0500 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: ps questions -- Message-ID: <20121216051544.GA4324@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <201212160346 DOT qBG3kOEo007681 AT expert DOT ics DOT purdue DOT edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201212160346.qBG3kOEo007681@expert.ics.purdue.edu> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , 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 Sat, Dec 15, 2012 at 10:46:24PM -0500, Paul Townsend wrote: >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. I'm sure there is but I doubt that anyone is particularly interested in adding this functionality. >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? No. The listing of windows processes in Cygwin ps is basically "as-is". What you see is what you get. If you are looking for a robust command-line utility for listing Windows processes, I'm sure there are better tools than Cygwin's ps. cgf -- 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