From owner-freebsd-bugs Fri May 19 19:30:11 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id BF90737B72F for ; Fri, 19 May 2000 19:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id TAA61522; Fri, 19 May 2000 19:30:00 -0700 (PDT) (envelope-from gnats@FreeBSD.org) 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 ; 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 ; 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 ; 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 X-Send-Pr-Version: 3.2 Subject: bin/18686: lpc ignores EOF when interactive Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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