From owner-freebsd-current Thu Oct 15 06:53:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id GAA23820 for freebsd-current-outgoing; Thu, 15 Oct 1998 06:53:28 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from sage1.sagecorp.com ([204.250.198.2]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id GAA23815 for ; Thu, 15 Oct 1998 06:53:27 -0700 (PDT) (envelope-from djw@sage1.sagecorp.com) Received: from localhost (djw@localhost) by sage1.sagecorp.com (8.7.5/8.7.3) with SMTP id HAA15568; Thu, 15 Oct 1998 07:59:52 -0600 (MDT) Date: Thu, 15 Oct 1998 07:59:51 -0600 (MDT) From: Darren Whittaker To: Mike Smith cc: freebsd-current@FreeBSD.ORG, john.young@openmarket.com Subject: Re: problem in 3.0 In-Reply-To: <199810150127.SAA00583@dingo.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, 14 Oct 1998, Mike Smith wrote: > > 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? -Darren PS Thanks for your help ------------------ Darren Whittaker Senior Software Engineer Small Enterprise Group Open Market, Inc. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message