delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2016/11/29/19:29:20

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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; q=dns; s=default; b=E17eoTz6a3dP4d41
Z+JjVwH8eRm/SOP5+o+gcPLWVCY35nviJqGxfNEIcjWZJqbSoc8NP8LRHinPjsyA
7a5U1Jw62NJyyBfpEWZmBK+XSY5dMyKNPfytAuEOEe+mAYOSt0AJTIlD1+M/+MRW
Gvb6aRvWzk+MJigbOrsLbbukInY=
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:subject:to:references:from:message-id:date
:mime-version:in-reply-to:content-type
:content-transfer-encoding; s=default; bh=5qHs/IL3O1pVV9BQp7gPGB
Qyt14=; b=GcAIpdy1Y2UcJmeQSWaHntAz02dNG4xhta5UxgFe9g520vbjsCtPPH
IJJMercn8EVh2GBtqnTfS0+Kt1peX1blw3NkTLxZaF+AXqSQpZaliDTQ2sWD4kHT
zZO8h6vr04WhIs4HJ094Da7BTcA5YMjxqWtdkt9/3AfKL+ElkU7hQ=
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-Virus-Found: No
X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=H*u:5.1, Hx-languages-length:1543, H*i:sk:2925977, H*MI:sk:2925977
X-HELO: mout.gmx.net
Subject: Re: Retrieving per-process environment block?
To: cygwin AT cygwin DOT com
References: <CAOTD34ZFH5E3r3AuDOXctss46e1hoU2f9pwE1mt4L674J2Ak_A AT mail DOT gmail DOT com> <20161117140012 DOT GA23664 AT calimero DOT vinschen DOT de> <CAOTD34Y9TRq2Qq8Mn2awTf9SCgz0qnbBa-a117pkSEvz9gaHKQ AT mail DOT gmail DOT com> <98eb08bf-5012-fe14-b10c-241b427c4366 AT cs DOT umass DOT edu> <CAOTD34bPTUkKiHSmqvczz6juePBD=6PyzabDFfHpYL_cFzyf9A AT mail DOT gmail DOT com> <2925977 DOT 20161129192741 AT yandex DOT ru>
From: Herbert Stocker <hersto AT gmx DOT de>
Message-ID: <583E1D4A.4020703@gmx.de>
Date: Wed, 30 Nov 2016 01:28:58 +0100
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <2925977.20161129192741@yandex.ru>
X-UI-Out-Filterresults: notjunk:1;V01:K0:XVZAEB9aZqE=:+guhaGiCgJu98QGCr/FrYV T0UN7oBuyMNcwKhpZ9OryMz7aq/V2hMfNPzCzbBQLQbPLyxBAtR3TKjD1+HXtxPIzRS9vgz7f 0GDCxoVRce8KLVLc3CX1t+a0HRILQtRHBngB7laPqgKPABLboCQAYh00sN4GHC5TJ6adLebw4 qOJvS09eR8fn68mU9JmX8wn2oUQrBhSN9XGZyqVfQDruwTY2x28GiVdCEcZVBjXtN3jFsxFHj jrs5f3oTwt7jolKkUM9yi3Hk/ON8ID3kSLCQB4Xg7zdJWJscTPGE6AR2rqjI7sE3UXPD3PcxQ hmv6HzKdbTxX8NlmM9mmoWyOqCA5bOcNWxqyo6oAEKUvyhbOXD/xI0e5/tD1zwsjiFNb/esvc Ol5LpNFV3uIAMZpqzVLEECW/CT7h+ZEHS4wH1jPSuUfdG4bE4LDloK94++SdUPQn4KvXLE0vW k7FkddbrGhhLnCQ4SgZBQJpdwEO6SrmYD0ny/7CLhko5ie3Jo/9u57o94JnkmPKT85RL2jd6Q R95RKhptbwkhRWKq9U9niof0zSdr2FRCo/goF3dpxAJ0U6j7NdAI10w80ZNSL3tO3e7hPA5DY zve3opTCpuOhP2rk70mhP4cC7X7mmuCl5D+unDJfRJFz1tXQtOloBh9I5avz60895Q4aj/eCR VZrCxSrFoX+d0EmFWQCUhAGYFyFLpOc4W9LwTBbvZpMEDJz4WsRr1gPmLyZHSoLvdwAyxVq+n TtdaNKcB/dm+NykgIkn827n8vpULgcvQGGuSAdyG3xLDdOWNT1ortyc+zLUxu/MdRTKLTYHN/ VEKdK6D
X-IsSubscribed: yes

Hi,

On 29.11.2016 17:27, Andrey Repin wrote:
> Greetings, Erik Bray!
>
>> Thanks for the reply.  The issue here isn't getting the Windows
>> process environment--that can be done, albeit trickily [1].  While
>> it's true there are security implications, in this case that is
>> handled at the OpenProcess call required to obtain a handle to the
>> process.  It's true you can't just read the environment from a process
>> you don't have permission to.
>
>> The issue here though is reading the Cygwin process's environment
>> which is separate from its Windows environment, and the above
>> technique is inapplicable.
>
> Update Windows environment block when Cygwin environment is updated.
>

How about the case where paths are translated from Windows style to
Posix style when the Windows environment is copied to Cygwin environ-
ment on process initialization? Should they be converted back?
And thus psutils has to convert them back again to Posix style?
What will happen if a Cygwin process stores a windows path in its
environment?

Maybe each such variable should have a second variable in the Windows
environment block that contains the Posix version of the variable and
psutils picks that, in order to avoid round trip conversion inaccura-
cies.

Yea it's me again advocating against round trip conversions.

Or we simply copy the variables unconverted to the Windows environment
block, as the Windows env block is not used for anything else - up to
now it is not updated at all.


Herbert



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