From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail1.dyalog.com (mail1.srv.bramley.dyalog.com [81.187.219.132]) by sourceware.org (Postfix) with ESMTPS id E62D23858D20 for ; Fri, 27 Jan 2023 09:08:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E62D23858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=dyalog.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=dyalog.com Received: from johndhome (55.227.187.81.in-addr.arpa [81.187.227.55]) by mail1.dyalog.com (Postfix) with ESMTPSA id 1A323600009 for ; Fri, 27 Jan 2023 09:08:36 +0000 (UTC) From: "john daintree" To: References: <002f01d93092$ac4f7ff0$04ee7fd0$@dyalog.com> <1139801724.20230127104437@yandex.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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQF7/nXDKjQKVLVOQYR1Wj+frFsGcQKECeBVr1g+KWA= Content-Language: en-gb 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 List-Id: 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 Sent: 27 January 2023 07:45 To: john daintree ; cygwin@cygwin.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...