From owner-freebsd-bugs@FreeBSD.ORG Tue Oct 31 03:30:13 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2887116A49E; Tue, 31 Oct 2006 03:30:13 +0000 (UTC) (envelope-from gad@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id BF70F43D45; Tue, 31 Oct 2006 03:30:12 +0000 (GMT) (envelope-from gad@FreeBSD.org) Received: from freefall.freebsd.org (gad@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9V3UCfX081183; Tue, 31 Oct 2006 03:30:12 GMT (envelope-from gad@freefall.freebsd.org) Received: (from gad@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9V3UCP5081179; Tue, 31 Oct 2006 03:30:12 GMT (envelope-from gad) Date: Tue, 31 Oct 2006 03:30:12 GMT From: Garance A Drosehn Message-Id: <200610310330.k9V3UCP5081179@freefall.freebsd.org> To: gad@FreeBSD.org, freebsd-bugs@FreeBSD.org, gad@FreeBSD.org Cc: Subject: Re: bin/104731: [patch] missing newline in lpq output X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 Oct 2006 03:30:13 -0000 Synopsis: [patch] missing newline in lpq output Responsible-Changed-From-To: freebsd-bugs->gad Responsible-Changed-By: gad Responsible-Changed-When: Tue Oct 31 03:26:13 UTC 2006 Responsible-Changed-Why: I'll look into this, and do something similar to your lpq-patch2.txt, although it won't be quite the same. Note that if the while(i=read()) loop is executed more than once, then your lastChar check may write out an extra '\n' line. Also, when I've seen this problem, I've also seen that the remote-host is in fact sending back '\r' characters, and I'd want to do something a bit more intelligent in that case. http://www.freebsd.org/cgi/query-pr.cgi?pr=104731