From bob@relent.bob.whitebarn.com  Mon Jan  4 21:18:35 1999
Received: from smtp.whitebarn.com (in.WhiteBarn.com [216.0.13.74])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA29879
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 4 Jan 1999 21:18:35 -0800 (PST)
          (envelope-from bob@relent.bob.whitebarn.com)
Received: from relent.bob.whitebarn.com (relent.bob.WhiteBarn.com [216.0.13.10])
	by smtp.whitebarn.com (8.8.8/8.8.8) with ESMTP id XAA21344
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 4 Jan 1999 23:17:58 -0600 (CST)
	(envelope-from bob@relent.bob.whitebarn.com)
Received: (from bob@localhost)
	by relent.bob.whitebarn.com (8.9.1/8.9.1) id XAA11898;
	Mon, 4 Jan 1999 23:23:14 -0600 (CST)
	(envelope-from bob)
Message-Id: <199901050523.XAA11898@relent.bob.whitebarn.com>
Date: Mon, 4 Jan 1999 23:23:14 -0600 (CST)
From: Bob@whitebarn.com
Reply-To: Bob@whitebarn.com
To: FreeBSD-gnats-submit@freebsd.org
Subject: /usr/share/examples/printing/ifhp has bad exit
X-Send-Pr-Version: 3.2

>Number:         9321
>Category:       misc
>Synopsis:       /usr/share/examples/printing/ifhp has bad exit
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jan  4 21:20:01 PST 1999
>Closed-Date:    Sat Jan 23 09:06:07 PST 1999
>Last-Modified:  Sat Jan 23 09:07:09 PST 1999
>Originator:     Bob Van Valzah
>Release:        FreeBSD 3.0-RELEASE i386
>Organization:
WhiteBarn Web Works
>Environment:
>Description:

	/usr/share/examples/printing/ifhp exits with error code 2 even
	after successfully printing a plan-text document.

>How-To-Repeat:

	Install /usr/share/examples/printing/ifhp in /usr/local/libexec/hpif,
	configure /etc/printcap to use it as an input filter, and then try
	to print a plain-text document.

>Fix:
	
	[Note that the printing section of the handbook has this example
	right--it's just wrong in /usr/share/examples/printing/ifhp.]

	Here's the context diff:
	diff -c /usr/share/examples/printing/ifhp /usr/local/libexec/hpif
	*** /usr/share/examples/printing/ifhp        Sat Oct 17 12:05:19 1998
	--- /usr/local/libexec/hpif     Mon Jan  4 22:52:59 1999
	***************
	*** 26,32 ****
	      #  Plain text or HP/PCL, so just print it directly; print a form
	      #  at the end to eject the last page.
	      #
	!     echo $first_line && cat && printf "\f" && exit 2
	  fi
	  
	  exit 2
	--- 26,32 ----
	      #  Plain text or HP/PCL, so just print it directly; print a form
	      #  at the end to eject the last page.
	      #
	!     echo $first_line && cat && printf "\f" && exit 0
	  fi
	  
	  exit 2

	Note "exit 2" changed to "exit 0".

	Thanks!

	Bob

	I'm a happy FreeBSD user!
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: rnordier 
State-Changed-When: Sat Jan 23 09:06:07 PST 1999 
State-Changed-Why:  
Committed: ifhp 1.3.  Thanks! 
>Unformatted:
 
