www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2000/10/27/04:49:34

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Fri, 27 Oct 2000 10:47:53 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: djgpp-workers AT delorie DOT com
Subject: Re: Bash 2.04 beta 6a
In-Reply-To: <4.3.1.0.20001026195212.00b2d270@pop5.banet.net>
Message-ID: <Pine.LNX.4.10.10010271039260.17044-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 26 Oct 2000, Peter J. Farley III wrote:
> At 06:50 PM 10/26/00 +0200, Eli Zaretskii wrote:

> I do wonder, does DJGPP's bash thinks it is being run interactively 
> when invoked from system()?  That would invoke the "#" rule, for 
> sure.  

Actually, I think it's the other way round. For '#' _not_ to be comment
start, Bash has to be running in interactive mode, and the option allowing
comments for interactive shells must be off (It's on by default, IIRC).
I.e. the only case in which I can see the original testcase behave like
the apparent expectation of the test script would be if Perl not only
invoked the shell interactively, but also turned of that shell option,
deliberately.

Either that, or the bug really is in Perl. Like, some command-line
preprocessing that's supposed to be done, is not. Automatic quotation
of 'echo' strings beginning with a '#' or whatever might be it.
Without a Perl guru at hand, I have no idea what the right answer to
that might be.

> Maybe the shell needs to be told it is being run 
> non-interactively?  Is this possible?  I'm thinking that when perl on 
> *ix invokes the shell, the shell already knows he is not being run 
> interactively, and so suspends or bypasses the "#" rule.

Non-interactive shells will always treat # as a comment character. There's
not even option to switch off that behaviour.

If there's an error regarding interactivity status, it would have to be in
the opposite direction.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019