Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 1998 22:49:57 -0700
From:      Mike Smith <mike@smith.net.au>
To:        Darren Whittaker <djw@sage1.sagecorp.com>
Cc:        Mike Smith <mike@smith.net.au>, freebsd-current@FreeBSD.ORG, john.young@openmarket.com
Subject:   Re: problem in 3.0 
Message-ID:  <199810160549.WAA00789@dingo.cdrom.com>
In-Reply-To: Your message of "Thu, 15 Oct 1998 07:59:51 MDT." <Pine.SOL.3.93.981015075604.15545B-100000@sage1.sagecorp.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> > > The code appeared to work until I set buf[0] = '\0'; at the start of the
> > > loop, then only one message was displayed. Since err displays to std error
> > > and I have to run this program from a browers I did not see any error
> > > messages.
> > 
> > I specifically asked what the exact code below does when built as a 
> > program and run on your system.
> > 
> > If setting buf[0] to 0 kills all but the first output, you should be 
> > checking the return from fgets, as it's likely that it's not returning 
> > anything.
> You are right, when I check the return value of fgets, it's NULL, and
> feof() returns a non-zero value meaning at end of file. So is this more of
> an I/O problem than a popen error?

It would tend to indicate that there's something wrong, yes.  8)  You 
need to go back to the test source I posted, and see whether that works 
(it does), and then look at the environment your cgi binary is running 
in and work out why it's *not* working.

You may have encountered a bug either in our C library or Apache.  Does 
the code work on another platform?  Can you add more debugging?  Does 
the child 'date' process always get created?  What happens to it?

-- 
\\  Sometimes you're ahead,       \\  Mike Smith
\\  sometimes you're behind.      \\  mike@smith.net.au
\\  The race is long, and in the  \\  msmith@freebsd.org
\\  end it's only with yourself.  \\  msmith@cdrom.com



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199810160549.WAA00789>