Mail Archives: djgpp-workers/2000/10/27/02:24:32
> Date: Thu, 26 Oct 2000 20:13:22 -0400
> From: "Peter J. Farley III" <pjfarley AT banet DOT net>
>
> Well, on the Linux I have available, using the "-c" option gave the
> same results as running it through a shell script.
That would justify a question to Perl gurus on Unix about how does
this work at all.
> I do wonder, does DJGPP's bash thinks it is being run interactively
> when invoked from system()?
From the Bash docs:
An interactive shell is one whose standard input and out-
put are both connected to terminals (as determined by
isatty(3)), or one started with the -i option. PS1 is set
and $- includes i if bash is interactive, allowing a shell
script or a startup file to test this state.
So it should run as an interactive shell, unless Perl redirects its
standard handles, and you should be able to see whether it is
interactive by looking at PS1 and $-.
It is possible that, if the DJGPP port of Perl redirects the standard
handles, but the Unix code uses the pipe() system call, the effect is
different. However, I don't think that pipe()'ed handles return
non-zero from isatty().
> Maybe the shell needs to be told it is being run non-interactively?
The question is: how does the Unix version tell Bash it's
non-interactive? If we know that, we could think how to do that with
DJGPP.
- Raw text -