From Cy.Schubert@uumail.gov.bc.ca  Fri May 19 19:24:32 2000
Return-Path: <Cy.Schubert@uumail.gov.bc.ca>
Received: from point.osg.gov.bc.ca (point.osg.gov.bc.ca [142.32.102.44])
	by hub.freebsd.org (Postfix) with ESMTP id A2B3D37BE32
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 May 2000 19:24:31 -0700 (PDT)
	(envelope-from Cy.Schubert@uumail.gov.bc.ca)
Received: (from daemon@localhost)
	by point.osg.gov.bc.ca (8.8.7/8.8.8) id TAA09855
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 May 2000 19:24:27 -0700
Received: from passer.osg.gov.bc.ca(142.32.110.29)
 via SMTP by point.osg.gov.bc.ca, id smtpda09853; Fri May 19 19:24:16 2000
Received: (from uucp@localhost)
	by passer.osg.gov.bc.ca (8.9.3/8.9.1) id TAA02689
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 19 May 2000 19:24:16 -0700 (PDT)
Received: from cwsys9.cwsent.com(10.2.2.1), claiming to be "cwsys.cwsent.com"
 via SMTP by passer9.cwsent.com, id smtpdxe2687; Fri May 19 19:23:25 2000
Received: (from cy@localhost)
	by cwsys.cwsent.com (8.10.1/8.9.1) id e4K2NOY07832;
	Fri, 19 May 2000 19:23:24 -0700 (PDT)
Message-Id: <200005200223.e4K2NOY07832@cwsys.cwsent.com>
Date: Fri, 19 May 2000 19:23:24 -0700 (PDT)
From: Cy.Schubert@uumail.gov.bc.ca
Reply-To: Cy.Schubert@uumail.gov.bc.ca
To: FreeBSD-gnats-submit@freebsd.org
Subject: lpc ignores EOF when interactive
X-Send-Pr-Version: 3.2

>Number:         18686
>Category:       bin
>Synopsis:       lpc ignores interactive EOF
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 19 19:30:00 PDT 2000
>Closed-Date:    Tue Oct 31 20:55:37 PST 2000
>Last-Modified:  Tue Oct 31 20:58:17 PST 2000
>Originator:     Cy Schubert
>Release:        FreeBSD 4.0-STABLE i386
>Organization:
UNIX Group, ITSD, ISTA, Province of BC
>Environment:

FreeBSD cwsys 4.0-STABLE FreeBSD 4.0-STABLE #0: Fri May 19 15:43:36 PDT 2000     root@cwsys:/usr/opt/cvs-400s-000517/src/sys/compile/CWSYS  i386

	and

FreeBSD hummer 4.0-STABLE FreeBSD 4.0-STABLE #0: Mon May 15 08:29:54 PDT 2000     root@hummer:/usr/cvs-400s-000422/src/sys/compile/HUMMER  i386

>Description:

Enter into lpc interactive mode.  Optionally issue some lpc commands.
Press ^D or your EOF character:

hummer# lpc
lpc> 
lpc> 
lpc> stat
Usage: stat {all | printer ...}
lpc> lpc> lpc> lpc> lpc> lpc> q
hummer# 

>How-To-Repeat:

See description.

>Fix:

The following patch restores lpc's behavior as in 2.x.x and 3.x.

--- src/usr.sbin/lpr/lpc/lpc.c.orig	Fri Aug 27 18:16:51 1999
+++ src/usr.sbin/lpr/lpc/lpc.c	Fri May 19 19:11:55 2000
@@ -169,7 +169,7 @@
 				el_source(el, NULL);
 			}
 			if ((bp = el_gets(el, &num)) == NULL || num == 0)
-				return;
+				quit(0, NULL);
 
 			len = (num > MAX_CMDLINE) ? MAX_CMDLINE : num;
 			memcpy(cmdline, bp, len);


sys# lpc
lpc> 
lpc> 
lpc> stat
Usage: stat {all | printer ...}
lpc> cwsys# 


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: gad 
State-Changed-When: Tue Oct 31 20:55:37 PST 2000 
State-Changed-Why:  
The minor problem with lpc which is described by this PR was fixed 
in RELENG4 (stable) back in July 2000. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=18686 
>Unformatted:
