X-Recipient: archive-cygwin AT delorie DOT com
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6AAF398B823
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com;
	s=default; t=1600254292;
	bh=TusT1fkhcYKArnv3KF+Ez8vb5Db7D5csvJDNxFRvImU=;
	h=References:In-Reply-To:Date:Subject:To:List-Id:List-Unsubscribe:
	 List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:
	 From;
	b=orX6jqNYeJ6uB/pmFugIjloeixCJFP/bt+hftSuEKn09bfIEdwYA4nkbJ3+eWxbva
	 VIlAPTKL3LXo6QHsUjIZO6WvYt58KAVsPbNjEtsg4GRwzYjSpQT7EUU+HH/wSh4lKV
	 da3qHvzflocr9HHAlPv3EuY3VwY+JbKia1ey0Jt0=
X-Original-To: cygwin AT cygwin DOT com
Delivered-To: cygwin AT cygwin DOT com
DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 00DF93986027
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=zYiNrFcQ205Bu96pAyWmT3fZ1Oqya9ldriDH7hwEre8=;
 b=i1onti2o91XVx3ztkMJYm8Ym59meBE91wQqmgkcBdWb/a1064JBSVmqZoop4VUcObl
 rCHmWjqOvARwmkteoej3uuOP9VMcgfDcEOiWcB0zp+ZihgIiageE/QS6c9WueXwjbsaM
 GIU7B6xmFvHy9r/2FXFdaf3z9UIUX2FyZ8xFhYDTatjS4ReGa//E2470/1gXvhdVyrEW
 CmDhqCaBvPeqCT42XkdfpYcZa5+62KDlP7lZYrpZzyN9kSAG2TTBLCr6oU7CIfwYG+PM
 JypSmXiyKzUK5VY9WfbabLeZK9sAJaimUG0W2GIOkv7ttO16Z4FpGmJkYnBj34baiScd
 fjqw==
X-Gm-Message-State: AOAM53260F3sl49ao1f/dDcc2gAGqidCfO07vy3LFLDFUVOx5STm+oot
 yJoPdKquZ0GRGS/IebDxmQcZFBnrczAHwSBEGaQ=
X-Google-Smtp-Source: ABdhPJxgTYjdNQAhpFuMnZ75WgAMISk7NA+o7/tPOKJtsy0Qx7xGgGY/Tt8rKSAjRoOb8O7Qazst+BYMPW3DlnhvQMw=
X-Received: by 2002:a17:906:e113:: with SMTP id
 gj19mr25152228ejb.263.1600254287811; 
 Wed, 16 Sep 2020 04:04:47 -0700 (PDT)
MIME-Version: 1.0
References: <025401d68c06$9a89e8b0$cf9dba10$@gmail.com>
In-Reply-To: <025401d68c06$9a89e8b0$cf9dba10$@gmail.com>
Date: Wed, 16 Sep 2020 13:04:36 +0200
Message-ID: <CAB8Xom9qowtQ+Jq1Z4tOxCHrVAugNyQ7UpVT3gXm1yJ9yj=bfg@mail.gmail.com>
Subject: Re: TMP/TEMP environment variable and /tmp
To: sten DOT kristian DOT ivarsson AT gmail DOT com
X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00, DKIM_SIGNED,
 DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,
 SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: marco atzeri via Cygwin <cygwin AT cygwin DOT com>
Reply-To: marco atzeri <marco DOT atzeri AT gmail DOT com>
Cc: The Cygwin Mailing List <cygwin AT cygwin DOT com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Sender: "Cygwin" <cygwin-bounces AT cygwin DOT com>

On Wed, Sep 16, 2020 at 10:53 AM Kristian Ivarsson via Cygwin
<cygwin AT cygwin DOT 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.
--
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