delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2021/01/04/17:40:39

X-Recipient: archive-cygwin AT delorie DOT com
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 56A5B3861838
Authentication-Results: sourceware.org;
dmarc=none (p=none dis=none) header.from=iname.com
Authentication-Results: sourceware.org;
spf=pass smtp.mailfrom=bstewart AT iname DOT com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.com;
s=dbd5af2cbaf7; t=1609799989;
bh=33q7i1zqmNjSy+mRaILONlTBWHa2rMa/twAwpKBC4y0=;
h=X-UI-Sender-Class:References:In-Reply-To:From:Date:Subject:To;
b=aq4Ep/evBkQFSu5PTfZ8WopUI2+HVDbpDW8vm9LI9P6tpS3FKolFcG2G2GX5vT9D2
NrvkfluHdLu5p/9j6cH+FcYvorlCa2GJcrbh490mPXrf5HgI2DeEgfEnrXnEyLCgpZ
R6EboN2L93bY2EwGaHJNrA6OAV/CGYSDreWWvf3w=
X-UI-Sender-Class: 214d933f-fd2f-45c7-a636-f5d79ae31a79
X-Gm-Message-State: AOAM531dxu+4CwO4l0JGFycGAzBc0UgeH7XjBIVvThI3PyTH3yvIV7nQ
yTo9Ip/e3USMlZShdJCfl1sZc4RLLHLaq7i1BzE=
X-Google-Smtp-Source: ABdhPJzLJIATLaqu8dUQI5XRiLdnhHUCRR9c+WJWc4oSMU4W39VgrgZRxEYA6HmyEz1wVeX/zouQ7Lsx1thws5YXvcI=
X-Received: by 2002:a2e:9605:: with SMTP id v5mr35051345ljh.81.1609799987206;
Mon, 04 Jan 2021 14:39:47 -0800 (PST)
MIME-Version: 1.0
References: <vriuwnwznjj7 DOT fsf AT gavenkoa DOT example DOT com>
<vriu5z4cpd84 DOT fsf AT gavenkoa DOT example DOT com>
In-Reply-To: <vriu5z4cpd84.fsf@gavenkoa.example.com>
From: Bill Stewart <bstewart AT iname DOT com>
Date: Mon, 4 Jan 2021 15:39:20 -0700
X-Gmail-Original-Message-ID: <CANV9t=QXiTVAYp=us72vmTOqf0LuTCRnzG4_Yc_Oa-SYUgjFNQ AT mail DOT gmail DOT com>
Message-ID: <CANV9t=QXiTVAYp=us72vmTOqf0LuTCRnzG4_Yc_Oa-SYUgjFNQ@mail.gmail.com>
Subject: Re: Setting env var CYGWIN for Cygwin service?
To: cygwin AT cygwin DOT com
X-Provags-ID: V03:K1:0zQ0gFzyLhlyc9xRYm2FW5ALkCONmf/yWAUGBahg9TQLEJOyX5T
z/d3TpIlJH8+EGL0hnI4s6rRSAy+ItW11cAY69KeB+cYou5TT9VqDBJbIVZDhrgNdDgEXcY
PGSJGx6GmJhYmSzzrws+GbqyO/d8nFpj6EIK97cJekCuWUYCsd1bS7iQtQrVQxoWKtlY97R
r18F5bYf65uydUgAVxY5g==
X-UI-Out-Filterresults: notjunk:1;V03:K0:YBAC0Fgv1nc=:/GDc3c2ugOvrlxXo7f8WBs
ok0jYUtiSp3sepr6zBWv0sY27NXAnHjVCsjwBNq2IgJC0r92jR9KvFSEIqBC0h2SFb+gkARLe
raqsquvrgXabNciak1AlO9H4Bntnhw3xW8WCO6zaJcruMbYlmsbcUYzXSJfPcuBFFxc2uVrUE
iUnj8Qfm7B11yZ6ElkoquTOl9ttjmuie5Oif7EGQzbebP/k1sgkILIkQJmc2AcvtYE5GNUEJU
G7abN9gRJBnJl2qI6EKQZ6gmlTzS5L8GZSFUAl9u50w1rm4M9tFIklOk0PsWUJo0vGXOD8ZaW
Gi9VxpgY8OwkZgM4HEa27CjQB+D8Y7rzOiOSPI3Uc6BgOXrRAu0z3LcBb2S4aYLUyDWWxB9EY
RaX7byRZ0eGEHvMBYzGRbexuqqrdylTvZiRqdGuUcRUu+xlP/4T/w3M+79K0zYXpVlUnLAN6t
nv3NtPSe6grJRqypNmyTGKnDTrkfr3kc286EvmOIRQJvKrNGadqJrcXtwlmdj3eevpmunogrq
MLoALLgU/1PMZjXmcsamQsVkQzQm1CMCuj7HRYUjBFlzoJxCRTlW9fUCiMQAvuxqlDrYQbP2c
28cDWorWRI9O4AXrkKVp3aR80yedHp+58ySYjp8UCXeWZVtG8kexjmbl6vz3ocJtUVyS5Tw4f
p/GIGpz5oicHohuJkf9cj3ELJNn+jW1PcIw7gOrEgIRRJwRF530BVPo4buvGHaQR3BxFwwZG8
C4JvAd/2TRjbIZ6ivpCrZi+8ueUX1aDVmFHM9LLFSFrX84SWvi1bzKlAtId4HKKmUB79CR/4B
z/dm7HVNyoWjpxQB3JyjPtaRaxWtrzPEDHZIB7qo7eCDOliBhg4Cc3NUq8xtGUSwz8Z7Z9Z0l
ReYnQJwQ6LG3vNrhR4Bg==
X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00, DKIM_SIGNED,
DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,
SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on
server2.sourceware.org
X-BeenThere: cygwin AT cygwin DOT com
X-Mailman-Version: 2.1.29
List-Id: General Cygwin discussions and problem reports <cygwin.cygwin.com>
List-Archive: <https://cygwin.com/pipermail/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-request AT cygwin DOT com?subject=help>
List-Subscribe: <https://cygwin.com/mailman/listinfo/cygwin>,
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe>
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT 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
--
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019