X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 81C94398BC0E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1600376843; bh=ZbH2GQuwl5gszF1oHAUQQwD9Tb8Qt+uKPYFRykbYh5k=; h=Subject:Date:References:In-Reply-To:To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=xhhsKXRJVVk9aUXBuAtQ+PpupLq9JJQRUWde+WXqQPI/POER79U/IaUr8ok3C9W9g HIXmmP7n633MWXaUT0dbBJyN7pOxvub58fEW8JrXQg8ZzbAp5v8CH22DCPQu+x5vgW 3sUIYll3gImE4x7Tu0rW54ZpqJeoJLZfb+N3Ny34= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 97F543945057 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:content-transfer-encoding:from:mime-version :subject:date:message-id:references:cc:in-reply-to:to; bh=17FHao3NRTsd/Uetp6LfY/2zaOo91sTgl/9ekAv9I2E=; b=d3G5UhwGhdU2dly1bHRwgLIg39nMubffadLErLrTFDKERcVYdDoi0pZhrtK5ZfzNgA 44e5lTIVBu0bt8MXhLnEngW2cga2x9LOIqd56j98EQitQyErBBNdOhm8A4iw05VOFgtu uz629d4Ukb5c2A/UJiN6hO7JyKxTpa5ujpBc3FJW6EMhhUd1bA1logYL11+0OF3blSPb jduS+9W2kxos9l5DWaAJoXtENtPzod5JyTGjkqTBNRbndnA/Kq3ot759q4HGfzXn1XmF Cb3xr1qPiKwMMTQNbGPG2TgklGiBCvF5T9IDnFOmDWbQJXhnxAzIHFYgFHcYCoRH1JtC pp9w== X-Gm-Message-State: AOAM533sBtrDjV+E87uaYGjrMdZCqHUn4ZnllhvVoEPjwfAy1VzpTc1a olCiAVngXiWxZzTHes+j2+rQ5wP1G0w= X-Google-Smtp-Source: ABdhPJzk/nA334pTjCYi2+MBtys3Q4ijF9QUqHAPE3JL3p0SwZ7WnoGG+pCpIN2CFRalw34//IRKXA== X-Received: by 2002:a2e:b44f:: with SMTP id o15mr10293186ljm.321.1600376839383; Thu, 17 Sep 2020 14:07:19 -0700 (PDT) Mime-Version: 1.0 (1.0) Subject: Re: TMP/TEMP environment variable and /tmp Date: Thu, 17 Sep 2020 23:07:18 +0200 Message-Id: References: <3423eb8a-447e-015e-9eb7-84d455db0c4f AT towo DOT net> In-Reply-To: <3423eb8a-447e-015e-9eb7-84d455db0c4f@towo.net> To: Thomas Wolff X-Mailer: iPhone Mail (17H35) X-Spam-Status: No, score=-2.8 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 List-Archive: List-Post: List-Help: List-Subscribe: , From: Kristian Ivarsson via Cygwin Reply-To: Kristian Ivarsson Cc: cygwin AT cygwin DOT com Content-Type: text/plain; charset="utf-8" Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 08HL7nCv004519 >>>>>> 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) ? >>>>> 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. >>> Nowadays that would be $LOCALAPPDATA/Temp, or if you really insist, the >>> content of /proc/registry/HKEY_CURRENT_USER/Environment/TMP (or TEMP), >>> after similarly expanding environment variable references found in that. >>> >>> The fact that getting Windows' idea of the user's TEMP directory is not >>> immediately platform independent may well have been part of the rationale >>> for not even trying that. >> >> Well, at least it's up to the user >> >> If the user sets its TMP-variable to "C:\Jabba Dabba Dooo" or "/jabba dabba doo", I expect the value of getenv("TMP") should be just that and regardless of OS the value returned is whatever the variable is set to and not magically changed to "/tmp" > Of course and that's not happening, no worries. The issue was that TMP is set in /etc/profile and not inherited from the Windows environment. Well, where my Cygwin-compiled-application is running, there’s no Cygwin-installation and thus no /etc/profile so it cannot be set there (if /etc/profile is not a built in resource in every executable), so there must be some text-value inside the compiled executables used in some manner somehow Best regards, Kristian > -- > 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 -- 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