delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/03/12/17:50:17

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=sAoDLCcqA46dCos4
6I49WJYHigDqZZha/DhIlj/JUBjmE8VmRJ++Nff4QVHMxMht13RZrdjclRRWwNl6
4/+LUkufYfLW00pkNVBUFpONcjMEqSMhEOVUJYfTYpuFqtdDL4PtBNx1zssC1tsU
V9IQJloDiQLOZLQxur8pf929u8E=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:reply-to:message-id:to:subject
:in-reply-to:references:mime-version:content-type
:content-transfer-encoding; s=default; bh=0vZ+9ZzMQG5u8PtRbhYlzr
Na8+w=; b=GOfc9ZkQ3kJQkAu5kvfjD/89qi2LuTLWhRRZvOLWNRiJga4/6KjqwG
hUlw5GF8GZgbnasdr0t9MEnwOpTTcXNXrpUWEKHkrFXlINhtbL9Nd8h7OeXt0QPy
QXfOVuqdLX6lIEJywccgSD8G4hR6foWujEfOLuoe3WU5M+0IHuZMQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=BAYES_00,FREEMAIL_FROM,KAM_THEBAT,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.1 spammy=UD:ru, terrible, H*M:yandex, Wednesday
X-HELO: forward106j.mail.yandex.net
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1552427401; bh=dTZe5OGAXONsau3SN0xQthxP8Fz2rCz+7vuNYmK9UIQ=; h=In-Reply-To:Subject:To:Reply-To:From:Message-ID:References:Date; b=OTL3eYDUe+xtaHNMruiQOJjTlW3G80uuuiC/10DSOiT5jkaXE+VTzGxYUloBf2Dpu pL7WNjnDh5uHHdc2MgzueKNtLPvHNec9Ls30dXPrU7DNUoyF+31aGQSVzzAbZctmb2 jO3ByxiVnTC4dIBUnF03KMCkpurZouNSpVV5KVFI=
Authentication-Results: mxback13g.mail.yandex.net; dkim=pass header.i=@yandex.ru
Date: Wed, 13 Mar 2019 00:39:55 +0300
From: Andrey Repin <anrdaemon AT yandex DOT ru>
Reply-To: cygwin AT cygwin DOT com
Message-ID: <1713374829.20190313003955@yandex.ru>
To: Corinna Vinschen <cygwin AT cygwin DOT com>, cygwin AT cygwin DOT com
Subject: Re: Privilege(s) needed to run top command
In-Reply-To: <20190312205929.GQ3785@calimero.vinschen.de>
References: <20190312111411 DOT GH3785 AT calimero DOT vinschen DOT de> <1552391701449-0 DOT post AT n5 DOT nabble DOT com> <167740c9afacd1bd4f914cae2e19eb01 AT smtp-cloud9 DOT xs4all DOT net> <1552405511657-0 DOT post AT n5 DOT nabble DOT com> <20190312164725 DOT GK3785 AT calimero DOT vinschen DOT de> <1552410026803-0 DOT post AT n5 DOT nabble DOT com> <20190312171339 DOT GM3785 AT calimero DOT vinschen DOT de> <20190312173901 DOT GN3785 AT calimero DOT vinschen DOT de> <20190312202802 DOT GP3785 AT calimero DOT vinschen DOT de> <512910309 DOT 20190312233554 AT yandex DOT ru> <20190312205929 DOT GQ3785 AT calimero DOT vinschen DOT de>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from base64 to 8bit by delorie.com id x2CLoFXw007879

Greetings, Corinna Vinschen!

> 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

My bad. I checked the code on hand, but missed that last OpenProcess call.
My code working with visible windows and, indeed, is unable to catch
elevated window's path.


-- 
With best regards,
Andrey Repin
Wednesday, March 13, 2019 0:37:12

Sorry for my terrible english...
--
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