Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  1 Jul 2004 19:39:33 +0800 (CST)
From:      Li-Lun Wang (Leland Wang) <llwang@infor.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   bin/68552: tip(1) does not set noncanonical mode input processing properly
Message-ID:  <20040701113933.3760192C2@infor.ck.tp.edu.tw>
Resent-Message-ID: <200407011150.i61BoKRF010506@freefall.freebsd.org>

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

>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:



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