This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]

Re: [bug] Crazy I/O.

-----Original Message-----
From: Earnie Boyd <>
To: cygwin users <>
Date: 8  1999 . 18:46
Subject: [bug] Crazy I/O.


You use stdin as a _stream_ when calling gets(). So, try to call fseek(stdin, 0L, SEEK_SET) after the second dup2(). It should work.


>This bug has to do with getting back to the beginning of a file.  I was trying to test what happens with O_TEXT and O_BINARY based upon the CYGWIN variable and the [no]binmode value.  I'm using the 1998-12-3 release of the cygwin1.dll on NT4SP3.  I haven't tested with a recent snapshot but the list needs to know about this for the distributed version.
>I've included a test case.  You must save the file as text.tst.c, gcc -o text text.tst.c, and have your working directory set to the source code.
>-                        \\||//
>--                     --
>-- --
>PS: Newbie's, you should visit my page.
>Get your free address at