Subject: Re: Cygwin built DLL invoked from MSC app doesn't seem to be all there.
From: [email-masked] (Mikey)
To: [email-masked]
Cc: [email-masked]
Date: Tue, 25 May 1999 20:57:29 GMT

Cygwin's tty handling code doesn't return
the dev bit set on stat, to non cygwin programs.

Non cygwin programs (msvcrt mingw32) use
isatty or stat to find out if they are communicating
with a device, assumed to be the console.

st.dev, st.rdev are both always set for character devices.

fixing this would (off the top of my head) require cygwin to only pass down
standard handles(or duped redirected standard handles), 
and to copy the contents of the tty screen
buffer to a new buffer, switch the screen buffer in the console
window to the new buffer, and if the new process is a cygwin
one put everything back, before it continues, and probably
a lot of other things ;-)

Or maybe someone knows how to tweak the kernel to
return st.dev/rdev set on any handle?

W95_D:\usr\src\proj\test_headers>readdev NUL
Device No.    : 3
Inode #       : 0
File mode Hex : 2000
No. links     : 1
User Id       : 0
Group Id      : 0
Device No.    : 3
File size     : 0
Last Acc Date : Wed Dec 31 17:00:00 1969
Time created  : Wed Dec 31 17:00:00 1969
Time modified : Wed Dec 31 17:00:00 1969

W95_D:\usr\src\proj\test_headers>readdev aux
Device No.    : 3
Inode #       : 0
File mode Hex : 2000
No. links     : 1
User Id       : 0
Group Id      : 0
Device No.    : 3
File size     : 0
Last Acc Date : Wed Dec 31 17:00:00 1969
Time created  : Wed Dec 31 17:00:00 1969
Time modified : Wed Dec 31 17:00:00 1969

On Tue, 25 May 1999 10:46:19 -0700 (PDT), you wrote:

>--- Ian Zimmerman <[email-masked]> wrote:
>> Earnie Boyd wrote:
>> > 
>> > --- Jon Wells <[email-masked]> wrote:
>> > > It's seems that only some bits of the cygwin API work inside a dll
>> > > invoked from a none cygwin applications.
>> > -8<-
>> > > Anyone got any thoughts? I getting really close to having to use
>> > > micromush tools and yucky ugly stuff like that..
>> > 
>> > To communicate properly between cygwin and non-cygwin processes you must
>> have
>> > set notty in the CYGWIN variable before starting bash.
>> 
>> Why?  I thought (after reading the documents) that CYGWIN=tty just
>> enabled termios calls.  What harm does it do when cooperating with
>> non-cygwin programs?
>
>I don't know the why?  I just live with it.  The harm that it does is that the
>cygwin process cannot communicate properly with the non-cygwin process.
>
>The termios code has been rewritten for the next release and the new code is in
>the snapshots.  I don't know if the rewrite solves the communication problem.
>
>Possibly Chris Faylor, who did the rewrite, is listening.
>===
>"Earnie Boyd" <mailto:[email-masked]>
>CYGWIN RELATED HELP:
> DOCUMENTATION: <http://sourceware.cygnus.com/cygwin/docs.html>
>       DLLHELP: <http://www.xraylith.wisc.edu/~khan/software/gnu-win32/>
>ARCHIVE SEARCH: <http://www.delorie.com/archives/> OR
>                <http://www.eGroups.com/list/gnu-win32/>
>_________________________________________________________
>Do You Yahoo!?
>Get your free @yahoo.com address at http://mail.yahoo.com

--
Want to unsubscribe from this list?
Send a message to [email-masked]