public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Bill Stewart <bstewart@iname.com>
To: cygwin@cygwin.com
Subject: Re: Setting env var CYGWIN for Cygwin service?
Date: Mon, 4 Jan 2021 15:39:20 -0700	[thread overview]
Message-ID: <CANV9t=QXiTVAYp=us72vmTOqf0LuTCRnzG4_Yc_Oa-SYUgjFNQ@mail.gmail.com> (raw)
In-Reply-To: <vriu5z4cpd84.fsf@gavenkoa.example.com>

On Mon, Jan 4, 2021 at 3:08 PM Oleksandr Gavenko wrote:

> /usr/bin/exim-config has line with:
>
>   cygrunsrv -I exim -p /usr/bin/exim -e CYGWIN="${cygenv}" ...
>
> So it is the answer (as pointed by others).
>
> Still "procexp" doesn't show anything else besides PATH/WINDIR for "exim"
> process. It can be that cygrunsrv passed env vars in some Cygwin *magical way*.
>
> Cannot confirm this, attempt to read /proc/X/environ gives "<defunct>". There
> is no problem to read "environ" for other Cygwin processes.

I have observed the same thing. The environment variable setting
exists in the HKLM\System\CurrentControlSet\Services\<servicename>\Parameters\Environment
registry subkey, but Process Explorer does not show the environment
variable in the list of environment variables for the process.

I have not looked at the code, but it seems that environment variables
specified in this way are not propagated to the environment block for
the process but instead are read some other way.

Bill

      reply	other threads:[~2021-01-04 22:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-30 20:09 Oleksandr Gavenko
2020-12-31 11:07 ` Franz Fehringer
2020-12-31 15:20   ` Oleksandr Gavenko
2020-12-31 15:04 ` Bill Stewart
2020-12-31 15:41   ` Oleksandr Gavenko
2020-12-31 15:46   ` Brian Inglis
2021-01-04 22:08 ` Oleksandr Gavenko
2021-01-04 22:39   ` Bill Stewart [this message]

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='CANV9t=QXiTVAYp=us72vmTOqf0LuTCRnzG4_Yc_Oa-SYUgjFNQ@mail.gmail.com' \
    --to=bstewart@iname.com \
    --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).