From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout07.t-online.de (mailout07.t-online.de [194.25.134.83]) by sourceware.org (Postfix) with ESMTPS id 50881395182D for ; Wed, 16 Sep 2020 19:27:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 50881395182D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=t-online.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=HBBroeker@t-online.de Received: from fwd39.aul.t-online.de (fwd39.aul.t-online.de [172.20.27.138]) by mailout07.t-online.de (Postfix) with SMTP id 22B05426E40B for ; Wed, 16 Sep 2020 21:27:20 +0200 (CEST) Received: from [192.168.178.26] (EYWpl8ZYZhgU-lqbK945pc3UuTZvFbgkU0CiuCmDPIy-ktWI984UnYVAUJUr6+-g+X@[79.228.85.214]) by fwd39.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1kId5L-1d3CIy0; Wed, 16 Sep 2020 21:27:19 +0200 Subject: Re: TMP/TEMP environment variable and /tmp To: cygwin@cygwin.com References: <025401d68c06$9a89e8b0$cf9dba10$@gmail.com> <202459f2-75cc-1ac2-7953-67f98e6fdb35@towo.net> From: =?UTF-8?Q?Hans-Bernhard_Br=c3=b6ker?= Message-ID: <9e5ab93b-9b0b-6855-d5da-365da48ecce2@t-online.de> Date: Wed, 16 Sep 2020 21:27:20 +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: <202459f2-75cc-1ac2-7953-67f98e6fdb35@towo.net> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-ID: EYWpl8ZYZhgU-lqbK945pc3UuTZvFbgkU0CiuCmDPIy-ktWI984UnYVAUJUr6+-g+X X-TOI-EXPURGATEID: 150726::1600284439-0000418D-0CBFA89B/0/0 CLEAN NORMAL X-TOI-MSGID: e17fe9f6-376a-42e0-b099-b90164037ee0 X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00, FREEMAIL_FROM, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, 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-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 19:27:22 -0000 Am 16.09.2020 um 13:12 schrieb Thomas Wolff: > 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 >>> 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. A bigger part of the reason may have been what the result of that platform-dependent query would have been, back when the decision had to be made. For several releases you would have ended up with (your locally translated version of!) stupid old "Documents and Settings" as part of the pathname, and possibly some extra blanks and special characters from the user name, on top of that. And I for one really do not trust that a Unix temp directory can safely have white space in its name without breaking lots of tools' behavior in nastily interesting ways. IIRC it took until Windows 8 for Microsoft to finally own up to their error and change it to the profoundly less insane "Users". But by then it was too late, all the damage had been done already.