[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash invokes ".bash_logout" on "exit" command in command substitution
From: |
jeffsh |
Subject: |
bash invokes ".bash_logout" on "exit" command in command substitution |
Date: |
Sun, 8 Jul 2001 22:13:47 -0400 (EDT) |
Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu'
-DCONF_VENDOR='pc' -DSHELL -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -I.
-I/usr/include -I/home/swt/doko/export/packages/bash/bash-2.05
-I/home/swt/doko/export/packages/bash/bash-2.05/include
-I/home/swt/doko/export/packages/bash/bash-2.05/lib -I/usr/include -g -O2
uname output: Linux eden-hda7.my.local 2.2.19 #5 Mon Jun 25 16:26:03 EDT 2001
i586 unknown
Machine Type: i386-pc-linux-gnu
Bash Version: 2.05
Patch Level: 0
Release Status: release
Description:
Here is what the bash man page says about ".bash_logout",
When a login shell exits, bash reads and executes commands
from the file ~/.bash_logout, if it exists.
If the "exit" command is executed by bash inside of a
command substitution (which is not by definition a login
shell), then the ".bash_logout" is invoked.
Note that I can reproduce this problem only when I am
logged in as "root(uid=0)"; however, when I am logged in
as "jeff(uid=1001)" I cannot reproduce this problem.
Repeat-By:
In the following typescript, the problem manifests at
!100, but not at !196.
195 jeff ~ $ sul
--> su -
Password:
0=-su, 1=/etc/profile, EUID=0, PWD=~root, SHELL=/bin/sh, SHLVL=1
0=-su, 1=.bash_profile, EUID=0, PWD=~root, SHELL=/bin/sh, SHLVL=1
0=-su, 1=.profile, EUID=0, PWD=~root, SHELL=/bin/sh, SHLVL=1
0=-su, 1=.sh_env, EUID=0, PWD=~root, SHELL=/bin/sh, SHLVL=1
100 root ~ # aa=`exit` ; echo $aa
0=-su, 1=.bash_logout, EUID=0, PWD=~root, SHELL=/bin/sh, SHLVL=1
101 root ~ # exit
logout
0=-su, 1=.bash_logout, EUID=0, PWD=~root, SHELL=/bin/sh, SHLVL=1
196 jeff ~ $ aa=`exit` ; echo $aa
197 jeff ~ $
Fix:
[Description of how to fix the problem. If you don't know a
fix for the problem, don't include this section.]
Thanks,
--
Jeff Sheinberg <jeffsh@erols.com>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bash invokes ".bash_logout" on "exit" command in command substitution,
jeffsh <=