public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Herbert Stocker <hersto@gmx.de>
To: cygwin@cygwin.com
Subject: Re: Retrieving per-process environment block?
Date: Wed, 30 Nov 2016 04:28:00 -0000	[thread overview]
Message-ID: <583E1D4A.4020703@gmx.de> (raw)
In-Reply-To: <2925977.20161129192741@yandex.ru>

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

  reply	other threads:[~2016-11-30  0:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-17 18:05 Erik Bray
2016-11-17 18:11 ` Corinna Vinschen
2016-11-29 15:28   ` Erik Bray
2016-11-29 16:01     ` cyg Simple
2016-11-30 11:03       ` Corinna Vinschen
2016-11-29 16:35     ` Eliot Moss
2016-11-29 17:42       ` Erik Bray
2016-11-29 18:02         ` Andrey Repin
2016-11-30  4:28           ` Herbert Stocker [this message]
2016-11-30 10:43             ` Eliot Moss
2016-11-30 10:47               ` Peter Rosin
2016-11-30 10:47                 ` Erik Bray
2016-11-30 12:29                 ` Corinna Vinschen
2016-11-30 12:36                   ` Corinna Vinschen
2016-11-30 11:36           ` Corinna Vinschen
2016-11-30 11:06       ` Corinna Vinschen
2016-11-30 10:48     ` Corinna Vinschen
2016-11-30 14:49       ` Erik Bray
2016-11-30 15:04         ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=583E1D4A.4020703@gmx.de \
    --to=hersto@gmx.de \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).