delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
DKIM-Filter: | OpenDKIM Filter v2.11.0 sourceware.org 8F3A3385843E |
DKIM-Signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; |
s=default; t=1674810572; | |
bh=SVPu2oGbvDeW+gTNucJ/C4hIsj2FUtI4G80VTbC0+LU=; | |
h=To:References:In-Reply-To:Subject:Date:List-Id:List-Unsubscribe: | |
List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: | |
From; | |
b=Mw4nXlqtaOvofan2pxzcXXv5A64WcLODrn56eaowLd/a44BOqLNeMWPcWRXYFF5ah | |
wx1PenTCi32ZTijPqdT/JFUIaHOrLgDdWg3XFqVhKKSCpTJ2IN3o3KNeqy6KO1xfa0 | |
7P+uYANFq9QfJuLq+xrf4KjsU7sKPoLMdxuHdT+I= | |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.4.2 sourceware.org E62D23858D20 |
To: | <cygwin AT cygwin DOT com> |
References: | <002f01d93092$ac4f7ff0$04ee7fd0$@dyalog.com> |
<1139801724 DOT 20230127104437 AT yandex DOT ru> | |
In-Reply-To: | <1139801724.20230127104437@yandex.ru> |
Subject: | RE: TMP and TMPDIR mapping |
Date: | Fri, 27 Jan 2023 09:08:35 -0000 |
Message-ID: | <004501d9322e$effed500$cffc7f00$@dyalog.com> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Outlook 16.0 |
Thread-Index: | AQF7/nXDKjQKVLVOQYR1Wj+frFsGcQKECeBVr1g+KWA= |
X-Spam-Status: | No, score=-1.9 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, |
SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.6 (2021-04-09) 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> | |
From: | john daintree via Cygwin <cygwin AT cygwin DOT com> |
Reply-To: | john daintree <johnd AT dyalog DOT com> |
Sender: | "Cygwin" <cygwin-bounces+archive-cygwin=delorie DOT com AT cygwin DOT com> |
Hi Audrey. Here's an example of what's going on: >>: export TMPDIR=/cygdrive/c/tmp/jd >>: export TMPDIR2=/cygdrive/c/tmp/jd2 >>: cmd.exe Microsoft Windows [Version 10.0.22621.1105] (c) Microsoft Corporation. All rights reserved. C:\>echo %TMPDIR% C:\tmp\jd C:\>echo %TMPDIR2% /cygdrive/c/tmp/jd2 So, if I set TMPDIR and TMPDIR2 in bash, and then call cmd.exe then TMPDIR is changed to c:\tmp\jd but TMPDIR2 is left as /cygdrive/c/tmp/jd2 I was hoping that there's something I can do to get the following in cmd.exe: C:\>echo %TMPDIR2% C:\tmp\jd2 # TMPDIR2 "mapped" to c:\.... in the same way that TMPDIR is I hope that's a clearer example. Note that the actual use case is calling other Win32 programs, and the environment variable name is different, but the above example is an attempt to simplify the repro. $PATH is mapped in a similar way. So I assume that there is a list of names which are mapped. I'd like to be able to add my own names to that list. Thanks. John. -----Original Message----- From: Andrey Repin <anrdaemon AT yandex DOT ru> Sent: 27 January 2023 07:45 To: john daintree <johnd AT dyalog DOT com>; cygwin AT cygwin DOT com Subject: Re: TMP and TMPDIR mapping Greetings, john daintree! > My understanding is that Cygwin maps $TMP and $TMPDIR (and probably others) > to a Windows form (/cygdrive/c/tmp -> C:\tmp) Nop. The actual mapping depends on your settings, but defaults to /tmp which is inside Cygwin installation root. Another option is to mount /tmp with 'usertemp' option, which would then redirect it to the user's %TEMP%. > when calling a WIN32 program > (e.g. cmd.exe). Is it possible, from bash or from Cygwin startup , to add > additional environment variable names so that they are also automatically > mapped in the same way? What is your question, exactly? What you want to achieve and what your actual observation compared to expected behavior? -- With best regards, Andrey Repin Friday, January 27, 2023 10:41:46 Sorry for my terrible english... -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |