delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/03/31/10:24:29

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <002c01c0b9f5$e4a8d5d0$0200a8c0@mike>
From: "Mike Everest" <mike AT gsat DOT net DOT au>
To: <cygwin AT cygwin DOT com>
Subject: fgets() behaviour
Date: Sun, 1 Apr 2001 01:18:50 +1000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.00.2919.6700
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700

Hi Folks,

i have this crazy problem with fgets behaviour.

background info:
i am trying to write an authenticator for squid cache running under cygwin.
i am writing my code using ms visual studio, bacause not only is it familiar
to me, but also all of my existing development is all in there - i hope
nobody will tell me that i have to throw it away and use gcc <sigh>

anyway, my authenticator runs just fine when i run it interactively, and it
behaves just like squid wants it
to (pass the authenticator "username<space>password\n", and he returns
"ERR\n" or "OK\n" accordingly.

problem is that when squid runs it, the call to fgets() returns error 32
(reported by ferror())

the basic code is like this:

setbuf(stdout, NULL);

while(fgets(buf, 255, stdin) != NULL)
{
 // do stuff
}

any pointers?

thanks and regards,

Mike.




--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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