From owner-freebsd-current Thu Oct 15 22:45:40 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA14651 for freebsd-current-outgoing; Thu, 15 Oct 1998 22:45:40 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles312.castles.com [208.214.167.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA14645 for ; Thu, 15 Oct 1998 22:45:36 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id WAA00789; Thu, 15 Oct 1998 22:49:58 -0700 (PDT) (envelope-from mike@dingo.cdrom.com) Message-Id: <199810160549.WAA00789@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: Darren Whittaker cc: Mike Smith , freebsd-current@FreeBSD.ORG, john.young@openmarket.com Subject: Re: problem in 3.0 In-reply-to: Your message of "Thu, 15 Oct 1998 07:59:51 MDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 15 Oct 1998 22:49:57 -0700 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > > > 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