[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bash misbehaves when POSIXLY_CORRECT is set

From: Torsten Hilbrich
Subject: Bash misbehaves when POSIXLY_CORRECT is set
Date: Sat, 27 Oct 2001 21:37:14 +0200
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linu
x-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' -DCONF_VENDOR='pc' -DSHELL -DHAVE_CON
FIG_H  -D_FILE_OFFSET_BITS=64  -I. -I/usr/include -I/home/debian/src/bash/bash-2
.05 -I/home/debian/src/bash/bash-2.05/include -I/home/debian/src/bash/bash-2.05/
lib -I/usr/include -g -O2
uname output: Linux myrkr 2.4.10 #1 Fri Sep 28 20:40:40 CEST 2001 i686 unknown
Machine Type: i386-pc-linux-gnu

Bash Version: 2.05
Patch Level: 0
Release Status: release


I recently set the POSIXLY_CORRECT environment variable (as documented
by GNU df or GNU du) to get 512 byte as default output.  I set this
variable in /etc/environment (which is evaluated through PAM modules
during the login).

Today after first re-logging after doing the chance I noticed that the
bash is no longer reading /etc/profile, ~/.bash_profile nor ~/.bashrc.

I don't know if this behaviour is indented but the whole bash manpage
didn't even mentioned this environment variable. 


(Please note, strace works on Linux only, other systems uses truss or

Incorrect behaviour:

~$ POSIXLY_CORRECT=y strace bash --login 2>&1|egrep 'profile|\.bash'
~$ POSIXLY_CORRECT=y strace bash -i 2>&1|egrep 'profile|\.bash'

Correct behaviour:

~$ strace bash --login 2>&1|egrep 'profile|\.bash'
open("/etc/profile", O_RDONLY|O_LARGEFILE) = 3
read(3, "# /etc/profile: system-wide .pro"..., 770) = 770
open("/home/torsten/.bash_profile", O_RDONLY|O_LARGEFILE) = 3
read(3, "# ~/.bash_profile: executed by b"..., 696) = 696
stat64("/home/torsten/.bashrc", {st_mode=S_IFREG|0644, st_size=899, ...}) = 0
stat64("/home/torsten/.bashrc", {st_mode=S_IFREG|0644, st_size=899, ...}) = 0
open("/home/torsten/.bashrc", O_RDONLY|O_LARGEFILE) = 3
read(3, "# ~/.bashrc: executed by bash(1)"..., 899) = 899


I removed the setting of POSIXLY_CORRECT before launching the bash.

If you need further information, please tell me.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]