bug-bash
[Top][All Lists]
Advanced

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

Re: Strange bash behavior


From: Vladimir Marek
Subject: Re: Strange bash behavior
Date: Fri, 2 Dec 2016 10:31:32 +0000
User-agent: Mutt/1.5.22.1-rc1 (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)
> 
> Yes, though the line that runs exec8.sub is actually in execscript, and
> exec6.sub doesn't matter at all.  Changing ./ to ${PWD}/ should fix it.

Probably, I thought that having 'cd' in ~/.bashrc is too exotic to make
the tests work with it. But yes, that is workaround.

Still, this stops the bash:

bash -c 'bash -i 1; read -t 2 a < /dev/tty'


> >  - 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
> 
> This is strange, since the presence or absence or a controlling terminal
> doesn't have anything to do with whether or not there's a cd in a startup
> script that's not run by a non-interactive shell (that is, since the read
> script isn't run by an interactive shell, your .bashrc isn't run).  Very
> strange.

Sorry :)
-- 
        Vlad



reply via email to

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