X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 92FF0398E410 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1600395485; bh=utu2YOWoFhQ8IwdIRWye0/LJrzKgbOTqj8gu6tyBJuI=; h=Subject:To:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ujXEJr9f8C7sfdUMC+YtrGCZ6EWSwcggETWuRqNz9ZVqU9uEyw2SOW/fjN2Qm9gvU Y6MRXz3YtRgOhQmE/FK/Uepf7bBmjBfdJK1gP/BcibsibG50KGymWWFotCCWb5z03l WSakBcXBhu8MR23GRRUwKidu+pS3ri0yPfY1ok+o= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7524B39450EE ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VJVY+cemEAG6Vd9qJVIHI3LjFEoO9APa0Gtmfi7cAS86rzQoRUD85bvvro1wW3Ov9gxcVbzxNkx9sfbCE4i1Di6JKDsTQBFFkle+C9G4uv6yum7HMPeazQtdKezAZkyGyMnhsEtPmnYG2cJwRc7a8knj8kApFky7YTmzeQDngu1mkzv5shDeVtKmyeiOF3fwK5yAibdhO19se+fvb7deB5PUjN/aSHr/PqQkHjJEVI35oXnb3AnuueIJT6X/A/gB+SHfc941nXLxtxhHTFCRDqW6puSEwTkZ7lNKaDKx/o0Y0A+e4uVQxpoeCA302WpHOw/BvBp2pr4p0YiY+pMQdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=g78N+PhreJOutlHiFxduGv5am8eMGF1BcEqT8FqLFbE=; b=PuYwmrgv8AJxtqg54eSF2MY9b3iUHKP8xyap9lXrhcZJo/qV1JuHKwHCs9ChhwWUhujYsQhJ0BwSWZHGrXMDNCvJ6YRhU6kg0KfO04pOOh4wOONuqXmd4J29xDMiYNY+2gqH1HwoMzHW+AXtrEOo3nO0+ed4xCNprhphWpj0FMxiJN/IhAPr5NZI+GNrjbaKUiif38vdl2i0CYOeokvr/HPfa71ZGGTl1/GSziGZFq1leaCH7as60e4DoG+8jjciFHAZtZb0qSF3XttAoxJ65ZYwPtgrDhr12wffn3zEjICz1hgwpc8ODOdBhOZCxCTYki3Sl3r/owdPlaoMNFNGsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=cornell.edu; dmarc=pass action=none header.from=cornell.edu; dkim=pass header.d=cornell.edu; arc=none Subject: Re: TMP/TEMP environment variable and /tmp To: cygwin AT cygwin DOT com References: <3423eb8a-447e-015e-9eb7-84d455db0c4f AT towo DOT net> <423c729e-4c66-dd5e-73c0-4c636089ea35 AT cornell DOT edu> Message-ID: <687db96b-9f7e-8c50-4673-14435a20864b@cornell.edu> Date: Thu, 17 Sep 2020 22:17:59 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 In-Reply-To: Content-Language: en-US X-ClientProxiedBy: MN2PR04CA0031.namprd04.prod.outlook.com (2603:10b6:208:d4::44) To MN2PR04MB6176.namprd04.prod.outlook.com (2603:10b6:208:e3::13) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.0.17] (68.175.129.7) by MN2PR04CA0031.namprd04.prod.outlook.com (2603:10b6:208:d4::44) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.14 via Frontend Transport; Fri, 18 Sep 2020 02:18:00 +0000 X-Originating-IP: [68.175.129.7] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c107fa1f-d63c-440e-3b81-08d85b7910f4 X-MS-TrafficTypeDiagnostic: MN2PR04MB5694: X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:923; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EZmwRgT6lakJghnv6c81xSsuIKAry1m+8aAIBLrGMKWwhUhaN3C3k34ACqzthRbTxY8UVKHdtue3KrP6DDzhVJIxxltKQVrYPLt77w5/HqMJdFp7Sz8GtkFvzsJy4Hf5OwvFoh3oeXsp++23qEBbuPa97/gnomScn/oPg0pm+wZ3F/E1LJsNDRSPHiyPC3mn6sHAgrT/ZEMc/AASGyMMHfFxutSr7ciHX0equwWnYClEWjan3iX98OeZlSCWQBuCa8mDmfoMR9hiGmsI+9MFf06zW4VryqSQI/ie8TiMRnj7Q7iTwWRiENLReGYBLZM2mRfgxEK50KhhdK4aYZTi6ogq/P27vT+3rsh9eTHEgani8n8BJNZF6rqx8oS3DJ9lE0Mtrag4U0/2sgxYArhTcA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MN2PR04MB6176.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(136003)(366004)(376002)(39860400002)(6916009)(2906002)(66946007)(8936002)(86362001)(8676002)(66556008)(66476007)(52116002)(53546011)(186003)(316002)(786003)(16526019)(45080400002)(26005)(6486002)(16576012)(75432002)(36756003)(2616005)(478600001)(31686004)(5660300002)(31696002)(956004)(43740500002)(460985005); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: MXQ9JdBF9rJISqS/D5/SJL9Pip55tuZylF6+TQ17g0dIZbZSb5NJkf8zZ8iaw0gqXIgKstUpVYKXAsxdaZ1JIUKPzDx2YPXNTydKc85pHjLIkCsAvjbGievzzDLwthGcblJ5o+QoiMF0LVuN5MLzqnzC7Yn9HNgbZGI7VQIM8tPCFOlVpFowEVIxq5ZpyYSbCu5upQsDcYTJ5c37F7NUwJeQcAQtoES4p74H2aMuljzGDMpP6uFBoGSOxzPHj0+sPi3mQvnXA2OFuij/zSE0/bRp+tuBbvNy6hi9EVU/HDTkalsh+aTpH25nXNmZ2t8ujfd+5KH6lf8WPeVzWuiuD6lOBE67hdQ0jwQVsQuS2raVIjOydZuCGyUeCeoTXBsHEipmPBQrITVwSqqTAPq/8ftNnu5IxCaPVK/6GyKgxKkNoF863wqnA6tDT5eJZiddhHLhBl0KujN4p6N22EJjdAVPiIpqAZSvD2ovEfw17iUMroAYKTm3X72kPGJyw/AIFAbuCf232s7DlngbIhjCzGpf/9hcVBqArELBtN4+PIiGTerLspOgerb1qkEyi3cvJWnXvt7iE+LufEwo2umggkJRujR12uPZ0gu29NT3IUjyahk1tqrvenLbs27qtnndsyor0QsXKWsDyFEfx9LfZw== X-OriginatorOrg: cornell.edu X-MS-Exchange-CrossTenant-Network-Message-Id: c107fa1f-d63c-440e-3b81-08d85b7910f4 X-MS-Exchange-CrossTenant-AuthSource: MN2PR04MB6176.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2020 02:18:00.9655 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 5d7e4366-1b9b-45cf-8e79-b14b27df46e1 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0PoC1JRZ9v3AhlNGADWFIDkMburqngpFiswOhkSGbWk+4VGkEA4bhvYqAsaDYtY43hvrOCYdSV+wdDvfMwPsZg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR04MB5694 X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, MSGID_FROM_MTA_HEADER, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_PASS, 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 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Ken Brown via Cygwin Reply-To: Ken Brown Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: cygwin-bounces AT cygwin DOT com Sender: "Cygwin" On 9/17/2020 7:58 PM, Doug Henderson via Cygwin wrote: > On Thu, 17 Sep 2020 at 15:56, Ken Brown via Cygwin <> wrote: >> > > #include > #include > int > main () > { > char *temp_nam; > char *p_tmp_nam; > > printf ("$TMP is '%s'\n", getenv ("TMP")); > printf ("$TMPDIR is '%s'\n", getenv ("TMPDIR")); > printf ("$TEMP is '%s'\n", getenv ("TEMP")); > printf ("P_tmpdir is '%s'\n", P_tmpdir); > p_tmp_nam = tmpnam(0); > printf ("tmpnam() is '%s'\n", p_tmp_nam); > temp_nam = tempnam(0, 0); > printf ("tempnam() is '%s'\n", temp_nam); > free(temp_nam); > } > > > # start a new shell > $ sh > $ TMP= TEMP= ./show_tmp > $TMP is '' > $TMPDIR is '(null)' > $TEMP is '' > P_tmpdir is '/tmp' > tmpnam() is '/tmp/t707.0' > tempnam() is '/tmp/ffffd187.2' > > # start cmd.exe > $ /cygdrive/c/windows/system32/cmd.exe > Microsoft Windows [Version 10.0.18363.1082] > (c) 2019 Microsoft Corporation. All rights reserved. >> set TMP= >> set TEMP= >> show_tmp > $TMP is '(null)' > $TMPDIR is '(null)' > $TEMP is '(null)' > P_tmpdir is '/tmp' > tmpnam() is '/tmp/t709.0' > tempnam() is '/tmp/ffffd189.2' > > P_tmpdir is defined in Sorry, but I'm missing your point. How is this related to Kristian's claim that Cygwin is changing the value of the TMP environment variable to "/tmp"? Ken -- 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