Bug 63904 - /etc/bashrc could optimise resource usage with PROMPT_COMMAND and /etc/sysconfig/bash-prompt-{xterm,default}
Summary: /etc/bashrc could optimise resource usage with PROMPT_COMMAND and /etc/syscon...
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: setup
Version: 7.2
Hardware: noarch
OS: Linux
medium
low
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-04-21 10:21 UTC by Martin Sandiford
Modified: 2014-03-17 02:27 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2004-09-23 05:40:45 UTC
Embargoed:


Attachments (Terms of Use)

Description Martin Sandiford 2002-04-21 10:21:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020311

Description of problem:
/etc/bashrc could set PROMPT_COMMAND to "source
/etc/sysconfig/bash-prompt-xterm" instead of executing directly.

This would prevent an additional shell being run for trivial shell scripts (eg
echo commands).  Scripts that required a separate shell execution could
trivially spawn a new shell in the script.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
This is a optimisation issue, rather than a bug per se.  The system is currently
performing as expected.



Additional info:

Simple change to /etc/bashrc (hence the setup package) at line 28 for setup-2.5.7-1:

From:
PROMPT_COMMAND=/etc/sysconfig/bash-prompt-xterm

To:
PROMPT_COMMAND="source /etc/sysconfig/bash-prompt-xterm"

Comment 1 Bill Nottingham 2004-09-23 05:40:45 UTC
Hm, while this is an optimization, this would break making that an
executable (dunno why you'd do that, but...)


Note You need to log in before you can comment on or make changes to this bug.