TMP/TEMP environment variable and /tmp

marco atzeri marco.atzeri@gmail.com
Wed Sep 16 11:04:36 GMT 2020


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.


More information about the Cygwin mailing list