[Top][All Lists]

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

Re: Strange bash behavior

From: Chet Ramey
Subject: Re: Strange bash behavior
Date: Thu, 1 Dec 2016 16:27:04 -0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:45.0) Gecko/20100101 Thunderbird/45.5.0

On 12/1/16 2:28 PM, Vladimir Marek wrote:
> Hi,
> 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.

>  - 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

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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