From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by sourceware.org (Postfix) with ESMTPS id 97F543945057 for ; Thu, 17 Sep 2020 21:07:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97F543945057 Received: by mail-lj1-x236.google.com with SMTP id c2so3227619ljj.12 for ; Thu, 17 Sep 2020 14:07:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=17FHao3NRTsd/Uetp6LfY/2zaOo91sTgl/9ekAv9I2E=; b=d3G5UhwGhdU2dly1bHRwgLIg39nMubffadLErLrTFDKERcVYdDoi0pZhrtK5ZfzNgA 44e5lTIVBu0bt8MXhLnEngW2cga2x9LOIqd56j98EQitQyErBBNdOhm8A4iw05VOFgtu uz629d4Ukb5c2A/UJiN6hO7JyKxTpa5ujpBc3FJW6EMhhUd1bA1logYL11+0OF3blSPb jduS+9W2kxos9l5DWaAJoXtENtPzod5JyTGjkqTBNRbndnA/Kq3ot759q4HGfzXn1XmF Cb3xr1qPiKwMMTQNbGPG2TgklGiBCvF5T9IDnFOmDWbQJXhnxAzIHFYgFHcYCoRH1JtC pp9w== X-Gm-Message-State: AOAM533sBtrDjV+E87uaYGjrMdZCqHUn4ZnllhvVoEPjwfAy1VzpTc1a olCiAVngXiWxZzTHes+j2+rQ5wP1G0w= X-Google-Smtp-Source: ABdhPJzk/nA334pTjCYi2+MBtys3Q4ijF9QUqHAPE3JL3p0SwZ7WnoGG+pCpIN2CFRalw34//IRKXA== X-Received: by 2002:a2e:b44f:: with SMTP id o15mr10293186ljm.321.1600376839383; Thu, 17 Sep 2020 14:07:19 -0700 (PDT) Received: from [192.168.86.29] (87-249-176-245.ljusnet.se. [87.249.176.245]) by smtp.gmail.com with ESMTPSA id q4sm141710lfm.46.2020.09.17.14.07.18 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 17 Sep 2020 14:07:18 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: Kristian Ivarsson Mime-Version: 1.0 (1.0) Subject: Re: TMP/TEMP environment variable and /tmp Date: Thu, 17 Sep 2020 23:07:18 +0200 Message-Id: References: <3423eb8a-447e-015e-9eb7-84d455db0c4f@towo.net> Cc: cygwin@cygwin.com In-Reply-To: <3423eb8a-447e-015e-9eb7-84d455db0c4f@towo.net> To: Thomas Wolff X-Mailer: iPhone Mail (17H35) X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, 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@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Sep 2020 21:07:22 -0000 >>>>>> Does anyone know the rational with this behaviour and what can be >>>>>> done to get hold of the (real) Windows TMP/TEMP >>>>>> environment-variable-values (in a >>>>>> (hopefully) platform independent way) ? >>>>> so if you are making your custom tree, try to stick on that >>>>> expectation and have both directories. >>>> In general, you are free to set TMP to a directory of your choice, >>>> that's the purpose of that variable, no need to sync it with some root.= >>>> There is a comment in /etc/profile: >>>> # TMP and TEMP as defined in the Windows environment >>>> # can have unexpected consequences for cygwin apps, but it does not >>>> explain what consequences that might be; probably some trouble with >>>> ACL/access permissions for temporary files. >>> Nowadays that would be $LOCALAPPDATA/Temp, or if you really insist, the >>> content of /proc/registry/HKEY_CURRENT_USER/Environment/TMP (or TEMP), >>> after similarly expanding environment variable references found in that.= >>>=20 >>> The fact that getting Windows' idea of the user's TEMP directory is not >>> immediately platform independent may well have been part of the rational= e >>> for not even trying that. >>=20 >> Well, at least it's up to the user >>=20 >> If the user sets its TMP-variable to "C:\Jabba Dabba Dooo" or "/jabba dab= ba doo", I expect the value of getenv("TMP") should be just that and regardl= ess of OS the value returned is whatever the variable is set to and not magi= cally changed to "/tmp" > Of course and that's not happening, no worries. The issue was that TMP is s= et in /etc/profile and not inherited from the Windows environment. Well, where my Cygwin-compiled-application is running, there=E2=80=99s no Cy= gwin-installation and thus no /etc/profile so it cannot be set there (if /et= c/profile is not a built in resource in every executable), so there must be s= ome text-value inside the compiled executables used in some manner somehow Best regards, Kristian > -- > 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