From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 34615 invoked by alias); 22 Feb 2019 14:21:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 34528 invoked by uid 89); 22 Feb 2019 14:21:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=Hx-languages-length:728 X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 22 Feb 2019 14:21:33 +0000 Received: by mail-wm1-f68.google.com with SMTP id m1so2134628wml.2 for ; Fri, 22 Feb 2019 06:21:33 -0800 (PST) Return-Path: Received: from ?IPv6:2001:8a0:f913:f700:75e6:857f:3506:a1f4? ([2001:8a0:f913:f700:75e6:857f:3506:a1f4]) by smtp.gmail.com with ESMTPSA id z8sm854348wmi.28.2019.02.22.06.21.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 22 Feb 2019 06:21:30 -0800 (PST) Subject: Re: [PATCH] Testsuite: Ensure changing directory does not break the log file To: Alan Hayward , Tom Tromey References: <20190221103420.18162-1-alan.hayward@arm.com> <878sy8bwa5.fsf@tromey.com> Cc: "gdb-patches@sourceware.org" , nd From: Pedro Alves Message-ID: Date: Fri, 22 Feb 2019 14:21:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2019-02/txt/msg00358.txt.bz2 On 02/22/2019 12:36 PM, Alan Hayward wrote: > +# Safe version of cd that ensures the log file is not stopped. This comment seems unclear to me, if you don't consider the email context. What does it mean to "stop a file", for instance? How about: # Override the 'cd' builtin with a version that ensures that the # log file keeps pointing at the same file. We need this because # unfortunately the path to the log file is recorded using an # relative path name, and, we sometimes need to close/reopen the log # after changing the current directory. See get_compiler_info. > + > +rename cd builtin_cd > + > +proc cd { dir } { Thanks, Pedro Alves