www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1996/11/06/15:21:44

From: jeremy AT datachannel DOT com (Jeremy Blackman)
Subject: Resetting options on STDIN/STDOUT
6 Nov 1996 15:21:44 -0800 :
Sender: daemon AT cygnus DOT com
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <328112A8.1F86.cygnus.gnu-win32@datachannel.com>
Mime-Version: 1.0
X-Mailer: Mozilla 3.0Gold (Win95; I)
Original-To: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

Is there a way to set stdin and stdout into binary mode under gnu-win32,
cleanly?  Some code I am attempting to port simply does an
fdopen(0,"rb"); fdopen(1,"wb"); which works fine under Linux, or BSD,
but ends up with no output when compiled with gnu-win32 and then run.

Suggestions?  I've tried several hacks around this already.  The code
requires that stdout and stdin be in binary mode and also be actually
stdout and stdin - the program runs as a cgi script.

Thanks in advance.

--Jeremy Blackman
  (loki AT dragoncat DOT net / jeremy AT datachannel DOT com)
-
For help on using this list, send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019