Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/testsuite] Handle PS1 quirk in gdb.base/multi-line-starts-subshell.exp
Date: Tue, 15 Dec 2020 00:50:41 +0100	[thread overview]
Message-ID: <3180a393-388a-683f-0684-9f6862b3ce9b@suse.de> (raw)
In-Reply-To: <87eejscru5.fsf@tromey.com>

On 12/14/20 4:47 PM, Tom Tromey wrote:
>>>>>> "Tom" == Tom de Vries <tdevries@suse.de> 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


      reply	other threads:[~2020-12-14 23:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-14  6:55 Tom de Vries
2020-12-14 15:47 ` Tom Tromey
2020-12-14 23:50   ` Tom de Vries [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3180a393-388a-683f-0684-9f6862b3ce9b@suse.de \
    --to=tdevries@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=tom@tromey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox