From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4F2qCVn611/ccQAAWB0awg (envelope-from ) for ; Mon, 14 Dec 2020 18:50:49 -0500 Received: by simark.ca (Postfix, from userid 112) id 1ABF01F0AA; Mon, 14 Dec 2020 18:50:49 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id A4BF81E99A for ; Mon, 14 Dec 2020 18:50:45 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2DE433858D29; Mon, 14 Dec 2020 23:50:45 +0000 (GMT) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id 8A0933858D29 for ; Mon, 14 Dec 2020 23:50:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 8A0933858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tdevries@suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9FA88AC10; Mon, 14 Dec 2020 23:50:41 +0000 (UTC) To: Tom Tromey References: <20201214065505.GA3249@delia> <87eejscru5.fsf@tromey.com> From: Tom de Vries Subject: Re: [PATCH][gdb/testsuite] Handle PS1 quirk in gdb.base/multi-line-starts-subshell.exp Message-ID: <3180a393-388a-683f-0684-9f6862b3ce9b@suse.de> Date: Tue, 15 Dec 2020 00:50:41 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <87eejscru5.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: gdb-patches@sourceware.org Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/14/20 4:47 PM, Tom Tromey wrote: >>>>>> "Tom" == Tom de Vries writes: > > Tom> The problem is that the PS1 setting has no effect. > > Why is that? > The mechanism is as follows: - /etc/profile sets ENV=/etc/bash.bashrc - /bin/sh is started - /bin/sh executes ENV, in other words /etc/bash.bashrc - during the execution of /etc/bash.bashrc, PS1 is set unconditionally AFAIU, this is caused by this PR ( https://bugzilla.opensuse.org/show_bug.cgi?id=611966 ) which lurks in older version of openSUSE/SUSE. > Tom> Fix this by setting PS1 after spawning the subshell. > > Tom> Tested on x86_64-linux. > > Tom> Any comments? > > It seems fine but it may be good to understand why it is needed and > perhaps add a comment explaining it. Ack, will do. Thanks, - Tom