From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.13]) by sourceware.org (Postfix) with ESMTPS id 5B0E23894C16 for ; Thu, 17 Sep 2020 15:23:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5B0E23894C16 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=towo.net Authentication-Results: sourceware.org; spf=none smtp.mailfrom=towo@towo.net Received: from [192.168.178.45] ([95.90.245.244]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MRCFu-1k6jzO311g-00N93D for ; Thu, 17 Sep 2020 17:23:34 +0200 Subject: Re: Sv: TMP/TEMP environment variable and /tmp To: cygwin@cygwin.com References: <025401d68c06$9a89e8b0$cf9dba10$@gmail.com> <202459f2-75cc-1ac2-7953-67f98e6fdb35@towo.net> <9e5ab93b-9b0b-6855-d5da-365da48ecce2@t-online.de> <002001d68ceb$ce417d90$6ac478b0$@gmail.com> From: Thomas Wolff X-Tagtoolbar-Keys: D20200917172331333 Message-ID: <3423eb8a-447e-015e-9eb7-84d455db0c4f@towo.net> Date: Thu, 17 Sep 2020 17:23:31 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <002001d68ceb$ce417d90$6ac478b0$@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:X1qyYgcRZ7MQgy+DfImHhLs3Ui2YnKybEPBR0I0xS/HdvQAsC6D i6jd6hY9x7251uC38EP0aHNjAIcHIPmxvwANZMUfNSFvzwlwjfdSHiq75mQJ+UtnobHEmWD BxmGxG+6JUnap7jCTxxcsL7T+gXvSqL9/bZidI4o4SDpCCQG0NIcbRE/xwb3DaFL1OeWbsx TXVQNrKJU6RlL9AkKqLCA== X-UI-Out-Filterresults: notj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PF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * 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 15:23:37 -0000 Am 17.09.2020 um 14:12 schrieb Kristian Ivarsson via Cygwin: >>>>> 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. >> >> The fact that getting Windows' idea of the user's TEMP directory is not >> immediately platform independent may well have been part of the rationale >> for not even trying that. > > Well, at least it's up to the user > > If the user sets its TMP-variable to "C:\Jabba Dabba Dooo" or "/jabba dabba doo", I expect the value of getenv("TMP") should be just that and regardless of OS the value returned is whatever the variable is set to and not magically changed to "/tmp" Of course and that's not happening, no worries. The issue was that TMP is set in /etc/profile and not inherited from the Windows environment.