From: "john daintree" <johnd@dyalog.com>
To: <cygwin@cygwin.com>
Subject: RE: TMP and TMPDIR mapping
Date: Fri, 27 Jan 2023 09:08:35 -0000 [thread overview]
Message-ID: <004501d9322e$effed500$cffc7f00$@dyalog.com> (raw)
In-Reply-To: <1139801724.20230127104437@yandex.ru>
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@yandex.ru>
Sent: 27 January 2023 07:45
To: john daintree <johnd@dyalog.com>; 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...
next prev parent reply other threads:[~2023-01-27 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 7:57 john daintree
2023-01-27 7:44 ` Andrey Repin
2023-01-27 9:08 ` john daintree [this message]
2023-01-27 11:32 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='004501d9322e$effed500$cffc7f00$@dyalog.com' \
--to=johnd@dyalog.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).