From: Thomas Wolff <towo@towo.net>
To: cygwin@cygwin.com
Subject: Re: TMP/TEMP environment variable and /tmp
Date: Wed, 16 Sep 2020 13:12:03 +0200 [thread overview]
Message-ID: <202459f2-75cc-1ac2-7953-67f98e6fdb35@towo.net> (raw)
In-Reply-To: <CAB8Xom9qowtQ+Jq1Z4tOxCHrVAugNyQ7UpVT3gXm1yJ9yj=bfg@mail.gmail.com>
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
> <cygwin@cygwin.com> 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
next prev parent reply other threads:[~2020-09-16 11:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-16 8:51 sten.kristian.ivarsson
2020-09-16 11:04 ` marco atzeri
2020-09-16 11:12 ` Thomas Wolff [this message]
2020-09-16 19:27 ` Hans-Bernhard Bröker
2020-09-17 12:12 ` Sv: " sten.kristian.ivarsson
2020-09-17 15:23 ` Thomas Wolff
2020-09-17 21:07 ` Kristian Ivarsson
2020-09-17 21:55 ` Ken Brown
2020-09-17 23:58 ` Doug Henderson
2020-09-18 2:17 ` Ken Brown
2020-09-18 3:56 ` Brian Inglis
2020-09-18 5:56 ` Kristian Ivarsson
2020-09-18 13:15 ` Brian Inglis
2020-09-21 7:57 ` Sv: " sten.kristian.ivarsson
2020-09-20 7:20 ` Andrey Repin
2020-09-17 16:13 ` Ken Brown
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=202459f2-75cc-1ac2-7953-67f98e6fdb35@towo.net \
--to=towo@towo.net \
--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).