Privilege(s) needed to run top command

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Mar 12 20:59:00 GMT 2019


On Mar 12 23:35, Andrey Repin wrote:
> Greetings, Corinna Vinschen!
> 
> > This was complete nonsense.
> 
> > Actually, the problem was entirely in Cygwin's ps.exe, and it's a
> > long-standing problem at that.
> 
> > While the Cygwin DLL collected the complete process list for ps, ps then
> > didn't print any process it failed to call OpenProcess on.  These are a
> > *lot* of processes and the result looked a lot like the list of
> > processes in or connected to the current session.
> 
> > The reason for this behaviour was that the image path of a process could
> > only be fetched when opening the process.  Today I found new
> > functionality since Vista which allows to fetch the image path without
> > having to open the process, so `ps -W' will print all processes again,
> > just as in the good old XP times :}
> 
> Err, but why? PSAPI was available since… a long time since.
> And it is public API except for isolated processes.

Same problem:

https://docs.microsoft.com/en-us/windows/desktop/psapi/enumerating-all-processes


Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20190312/73c0fbd8/attachment.sig>


More information about the Cygwin mailing list