From llwang@infor.ck.tp.edu.tw  Thu Jul  1 11:40:30 2004
Return-Path: <llwang@infor.ck.tp.edu.tw>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8B51E16A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; 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 <FreeBSD-gnats-submit@freebsd.org>; 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) <llwang@infor.org>
Reply-To: Li-Lun Wang (Leland Wang) <llwang@infor.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: tip(1) does not set noncanonical mode input processing properly
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>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:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jul 01 11:50:19 GMT 2004
>Closed-Date:    Sat May 12 13:45:40 GMT 2007
>Last-Modified:  Sat May 12 13:45:40 GMT 2007
>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:
State-Changed-From-To: open->closed 
State-Changed-By: pav 
State-Changed-When: Sat May 12 13:42:14 UTC 2007 
State-Changed-Why:  
This has been fixed as part of vendor import 5 years ago - it's present in 5.0 
and up. 

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