Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 May 2000 19:23:24 -0700 (PDT)
From:      Cy.Schubert@uumail.gov.bc.ca
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/18686: lpc ignores EOF when interactive
Message-ID:  <200005200223.e4K2NOY07832@cwsys.cwsent.com>

next in thread | raw e-mail | index | archive | help

>Number:         18686
>Category:       bin
>Synopsis:       lpc ignores interactive EOF
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri May 19 19:30:00 PDT 2000
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200005200223.e4K2NOY07832>