From owner-freebsd-bugs@FreeBSD.ORG Thu Jul 1 11:50:51 2004 Return-Path: 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 60C6316A4CF for ; Thu, 1 Jul 2004 11:50:51 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E5F743D39 for ; Thu, 1 Jul 2004 11:50:51 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i61BoKWO010507 for ; Thu, 1 Jul 2004 11:50:20 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i61BoKRF010506; Thu, 1 Jul 2004 11:50:20 GMT (envelope-from gnats) Resent-Date: Thu, 1 Jul 2004 11:50:20 GMT Resent-Message-Id: <200407011150.i61BoKRF010506@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Li-Lun Wang (Leland Wang) Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8B51E16A4CE for ; Thu, 1 Jul 2004 11:40:30 +0000 (GMT) Received: from infor.ck.tp.edu.tw (infor.ck.tp.edu.tw [203.64.26.200]) by mx1.FreeBSD.org (Postfix) with ESMTP id ED5F943D1F for ; Thu, 1 Jul 2004 11:40:29 +0000 (GMT) (envelope-from llwang@infor.ck.tp.edu.tw) Received: by infor.ck.tp.edu.tw (Postfix, from userid 1001) id 3760192C2; Thu, 1 Jul 2004 19:39:33 +0800 (CST) Message-Id: <20040701113933.3760192C2@infor.ck.tp.edu.tw> Date: Thu, 1 Jul 2004 19:39:33 +0800 (CST) From: Li-Lun Wang (Leland Wang) To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: bin/68552: tip(1) does not set noncanonical mode input processing properly X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Li-Lun Wang \(Leland Wang\)" List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2004 11:50:51 -0000 >Number: 68552 >Category: bin >Synopsis: tip(1) does not set noncanonical mode input processing properly >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: Thu Jul 01 11:50:19 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Li-Lun Wang (Leland Wang) >Release: FreeBSD 4.9-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD Athena.infor.org 4.9-RELEASE-p1 FreeBSD 4.9-RELEASE-p1 #1: Wed Dec 3 02:14:02 CST 2003 root@Athena.infor.org:/home/adm/obj/usr/src/sys/Athena i386 >Description: tip(1) uses noncanonical mode input processing. However, it does not set the values of the VMIN and VTIME members of the c_cc array properly such that it fails to run within gnu screen started up detached. Running tip within screen started detached makes getchar() in tipin() receive EOF and exits immediately. >How-To-Repeat: Suppose you have a serial console called ms in /etc/remote: # screen -d -m tip ms # screen -ls # You would not find the screen started detached. >Fix: --- tip.c.orig Thu Jul 1 19:23:10 2004 +++ tip.c Thu Jul 1 19:26:07 2004 @@ -241,6 +241,8 @@ ctermios.c_cc[VINTR] = ctermios.c_cc[VQUIT] = -1; ctermios.c_cc[VSUSP] = ctermios.c_cc[VDSUSP] = ctermios.c_cc[VDISCARD] = ctermios.c_cc[VLNEXT] = -1; + ctermios.c_cc[VMIN] = 1; + ctermios.c_cc[VTIME] = 0; #else /* HAVE_TERMIOS */ ioctl(0, TIOCGETP, (char *)&defarg); ioctl(0, TIOCGETC, (char *)&defchars); >Release-Note: >Audit-Trail: >Unformatted: