[Top][All Lists]

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

Strange bash behavior

From: Vladimir Marek
Subject: Strange bash behavior
Date: Thu, 1 Dec 2016 22:28:10 +0000
User-agent: Mutt/ (2013-10-16)


I'm not sure what is going on, but the bash test suite was getting
stopped (as if SIGSTOP was received) in the middle. Trying to find
minimal set of conditions it came to this:

 - my ~/.bashrc has to contain 'cd /' (any dir works)
 - the tests have to first execute run-execscript, namely it has to
   execute exec6.sub, namely the line ${THIS_SH} -i ./exec8.sub
 - the file exec8.sub is reported as not found (I presume because of the
   'cd /' in .bashrc)
 - the tests then have to run read-test, exactly in read2.sub when
 'read -t 2 a < /dev/tty' was executed whole thing was stopped

When I removed the 'cd' command from my ~/.bashrc, all worked fine.

I then tried to make minimal reproducible case and came to this (this
time there is no 'cd /' in my ~/.bashrc needed):

$ bash -c 'bash -i i; bash -i i'
bash -c 'bash -i i; bash -i i'
bash: i: No such file or directory

[1]+  Stopped                 bash -c 'bash -i i; bash -i i'

I would not go as far as thinking it's a bug, but it's very suspicious
behavior to me. Also I'm not 100% sure that both problems are identical.

I am able to reproduce on Solaris 10 and 11 and on my OpenSuse Linux.
This covers bash version 3.2.52(1), 4.1.17(1) and 4.2.53(1). I have also
reproduced on latest 4.4.5 which I was doing testing on.

At that moment I decided to seek help here :)


reply via email to

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