From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.134]) by sourceware.org (Postfix) with ESMTPS id 5803A3851C3A for ; Wed, 16 Sep 2020 11:12:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 5803A3851C3A 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 (mreue009 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mdvyo-1ktDYA0s2o-00b2F1 for ; Wed, 16 Sep 2020 13:12:04 +0200 Subject: Re: TMP/TEMP environment variable and /tmp To: cygwin@cygwin.com References: <025401d68c06$9a89e8b0$cf9dba10$@gmail.com> From: Thomas Wolff X-Tagtoolbar-Keys: D20200916131203467 Message-ID: <202459f2-75cc-1ac2-7953-67f98e6fdb35@towo.net> Date: Wed, 16 Sep 2020 13:12:03 +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: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:WnLnNB3tDwbeTdNWjMUwJxKk1F9+R++Ogff2BnsG0ZeiSTToT0C 4YFuLU3R5c9LlR4d6t5bSZumk+0dOeLTNZI3mKKlri5cCALck07EpmCGDE1DAk7OEHE24mT riadzHI4RFjuWmOFakcF9ZMwss9bYuTIqe6omISIxDDCFvTSrwREl1qKkjqi++U59QWoX/m M6E/Fih+fs1zLrLtgwcDA== X-UI-Out-Filterresults: notjunk:1;V03:K0:hT7mH2d3XzU=:zavsA6lDfJ5FJU6dGWpeY3 +N2rypcGAuhaMd+c7XLE+aM/vH7/b6Rm+HmMj0+LL1cOewB2DIXfBO/DBVBwth+Sw1AnHNGis TP2whtTuG/f2aAvINMQEWdqylpoxjz9nvorjiA1YhxTv+K/BCMMleJN95KrJycvKn0HimPMWQ 5ygwYMVXf2iIS74x6cfnMsdc54/IcbHg05NGl7Szs4AnC1wuij+3gytuqunahEogUBlbvlzgl FROLu//rVrvx1ToFQ/2JmxHEJP7mrkL9UPPZ3zj88izBL8y0Haq3u8H/Uft8FhC5yeF02J0vk Pb/YG/X1PvrjOV/Lg5riFmBw/TSxkvnHNFzJXJU65EOG+M4ys0Dflwwf4cZ1xARVex2av6WgI RIMtn9FN/idLjVk55YXweHjIxFZPBjv+uJI/lJJurw9oPUmIIy9qecRrMEjC/Vk04YkNK4P/h sq7JFzvl1o5QIyU69Rsg+3BAlV2vft/iLoDvjDR+u5gwJxXylmTi2yu/4qhtL+9sZ7bdsnm5K qyGYcthVsCy5B190thN9oXHyWQFAACd0RLJ/znJKCL38ajI45ePQ/sY1w8R8z4gSggm9uM7e2 BPu9CwZnaz/uI2mg42bms9y/pxRzVqXdBhHX7T98v4j/iB4W/aslODdqUUAaTR60IjY493uOe Pvkdknorx/nyYxwXs6qZStjTXFNxQ6H9sdWn+GEA6ZqYy50oBBSWQtxjtRCiLdIzMuUenB0LM fthnFaXXiGtwy4p4SoMEFB5bM3HPyH2QDk08Pt2XceQ94lomsrGGqYWtv2yyHx17+ooiuWsyq 57ngMYdGT4l4DFC9iirBdxe1dxKX1eEaKVMlPVk2zvItb1YPEh83/FG2pMXZZXHE4rzi3C6 X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_ABUSEAT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_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: Wed, 16 Sep 2020 11:12:07 -0000 Am 16.09.2020 um 13:04 schrieb marco atzeri via Cygwin: > On Wed, Sep 16, 2020 at 10:53 AM Kristian Ivarsson via Cygwin > wrote: >> Dear folks >> >> Does anyone know why cygwin annex the TMP (and TEMP) environment variable(s) >> and sets them to /tmp for cygwin-built-applications (executables) ? >> >> This results in that when you want the current users TMP-folder you end up >> with the /tmp path. As a result,when writing to that, without having cygwin >> installed (e.g. C:\cygwin64\), it seems like it refers to ${CWD}/../tmp/ and >> that is not always accessible by all users >> >> >> 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) ? >> >> >> Best regards, >> Kristian >> > the logic behind is that the program should be located > in > $YOUR_ROOT/bin > > and the temp will be > $YOUR_ROOT/tmp > > 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. Thomas