From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Michael V. Nikolaev" To: , "cygwin users" Subject: Re: [bug] Crazy I/O. Date: Wed, 31 Mar 1999 19:45:00 -0000 Message-ID: <001501be699a$755c35d0$6400a8c0@orion.olvi.org> X-SW-Source: 1999-03n/msg00252.html Message-ID: <19990331194500.Q25XYaTRaydiyFclJ03o9EAqkLaEGl1K8_Wad55Hdd4@z> -----Original Message----- From: Earnie Boyd To: cygwin users Date: 8 áåðåçíÿ 1999 ð. 18:46 Subject: [bug] Crazy I/O. Hi! 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. Regards, Michael >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. > > >== >- \\||// >-------------------o0O0--Earnie--0O0o------------------- >-- earnie_boyd@yahoo.com -- >-- http://www.freeyellow.com/members5/gw32/index.html -- >----------------------ooo0O--O0ooo---------------------- > >PS: Newbie's, you should visit my page. >_________________________________________________________ >DO YOU YAHOO!? >Get your free @yahoo.com address at http://mail.yahoo.com > KCB•Ø[È[œÝXœØܚX™Hœ›ÛH\È\ÝÃB”Ù[™HY\ÜØYÙHÈÞYÝÚ[‹][œÝXœØܚX™PÛÝ\˜Ù]Ø\™K˜ÞY۝\˘ÛÛCB