Mail Archives: djgpp-workers/2000/10/27/04:49:34
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 -