This is the mail archive of the cygwin@sourceware.cygnus.com 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.



I don't sure that it shouldn't be needed. IMHO, it depends on implementation.
BTW, it works well on my installation: NT SP4, cygwin-20.1, coolview dll, no binary mounts, CYGWIN=binmode ... . Here is the respective chunk of source:

...
 dup2(fh1, 0);
 fseek( stdin, 0L, SEEK_SET );
 gets( fh1_IN );
...

This really works.

Wishes,

Michael

-----Original Message-----
From: Earnie Boyd <earnie_boyd@yahoo.com>
To: Michael V. Nikolaev <mvn@gu.kiev.ua>; cygwin users <cygwin@sourceware.cygnus.com>
Date: 8 áåðåçíÿ 1999 ð. 21:45
Subject: Re: [bug] Crazy I/O.


>---"Michael V. Nikolaev" <mvn@gu.kiev.ua> wrote:
>>
>> 
>> -----Original Message-----
>> From: Earnie Boyd <earnie_boyd@yahoo.com>
>> To: cygwin users <cygwin@sourceware.cygnus.com>
>> 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.
>> 
>
>Didn't help.  Besides, it shouldn't be needed.
>==
>-                        \\||//
>-------------------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
>
ÒÐÐ¥vçBFòVç7V'67&–&Rg&öÒF†—2Æ—7CðÐ¥6VæBÖW76vRFò7–wv–â×Vç7V'67&–&T6÷W&6Wv&Ræ7–vçW2æ6öÐÐ