Subject: Re: Consistent mode of file-opens
From: [email-masked] (Kimon Kontovasilis)

10 Oct 1997 07:26:26 -0700
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked] (Earnie Boyd)
Cc: [email-masked]

Dear Earnie,

> 
> >From: [email-masked] (Kimon Kontovassilis)
> >Subject: Consistent mode of file-opens
> >To: [email-masked]
> >Date: Wed, 8 Oct 1997 18:31:19 +0200 (EET)
> >Cc: [email-masked] (Kimon Kontovassilis)
> >
> >Hello, fellows!
> >
> ---snip---
> >
> >Consider now a system setup where all mount points have been flagged as
> >binary. (As previous discussions on this list have fully explained, 
> such a
> >setting is virtually necessary, if binary-file-oriented applications 
> are to
> >behave properly without being individually modified.)
> >The problem is that stdin, stdout and stderr are still opened in text 
> mode.
> >This breaks redirection and pipe operations dealing with binary data.
> >Things like
> >
> >	gunzip -c file.tar.gz | tar xvf -
> 
> You must be executing from the MSDosshell.  I've done this sort of 
> operation many times both on WNT3.51 and W95 within BASH without any 
> problems.
> 
> -        \\||//
> ---o0O0--Earnie--0O0o----
> [email-masked]
> ------ooo0O--O0ooo-------
> 

you 're indeed true. Thanks for your hint. I just checked and indeed verified
that redirections and pipes, from within bash, indeed behave properly.
(I must have been remarkably stupid not to try the test in the first place.)

I guess this renders obsolete most of my original message. However, since
all individual utilities work adequately well with the other dos-oriented
shells and since all the shells that I know of support redirection and
(simulated) pipes, it would be nice if the proper file mode selection worked
on these shells too.

Could it be that the start up code would check for a set PID variable
and, if not, perform the isatty()/_setmode() trick I was talking about?
(If I recall correctly, the PID check-trick is the mechanism used for invoking
the globber, when a gnuwin32-based app. runs outside of bash.)

Thanks again for your remark.

Kimon Kontovasilis,
NCSR "Demokritos".
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".