a terminal opened by kterm shows like this: % stty -a speed 13 baud; 30 rows; 80 columns; lflags: icanon isig iexten echo echoe echok echoke -echonl echoctl -echoprt -altwerase -noflsh -tostop -flusho pendin -nokerninfo -extproc iflags: -istrip icrnl -inlcr -igncr ixon -ixoff -ixany imaxbel ignbrk brkint -inpck -ignpar -parmrk oflags: opost onlcr -ocrnl -oxtabs -onocr -onlret cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow -dtrflow -mdmbuf cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = <undef>; eol2 = <undef>; erase = ^H; erase2 = ^@; intr = ^?; kill = ^U; lnext = ^V; min = 0; quit = ^\; reprint = ^R; start = ^Q; status = ^@; stop = ^S; susp = ^Z; time = 0; werase = ^W; We can see "min = 0". This may causes troubles for software using non-canonical mode. While xterm initialises min = 1, kterm does not. For example, min = 0 makes ports/japanese/ng, a simple text editor, busy loop in reading keyboard input from standard input. From ng-1.4.4/ttyio.c while (read(0, &buf[0], 1) != 1) ; We can also say ng-1.4.4 is buggy because it uses old tty interface and not setting VMIN parameter. ports/japanese/ng-devel is OK in this point. How-To-Repeat: kterm stty -a or (for not to inherit terminal settings) // from another host ssh FreeBSD kterm stty -a
State Changed From-To: open->feedback To which port does this Problem Report apply?
State Changed From-To: feedback->open Feedback received.
Responsible Changed From-To: freebsd-ports-bugs->nork I'll handle this.
State Changed From-To: open->closed Committed, thanks!
(some more additional information) kterm and also xterm will inherit the current terminal setting where k(x)term invoked. I often saw MIN=0 because I use ssh to launch kterm. % ssh SOMEHOST kterm -display MYHOST:0 In this case, ssh will not allocate pseudo-tty. kterm cannot inherit terminal setting and it results in MIN=0. // with "-t", ssh can forcibly allocate ptty. I checked on debian Linux's kterm port and found no MIN=0 problem. This is because that #if defined(linux) block in original kterm implementation makes a new psuedo terminal be always initialized with default values and never inheritating. In main.c, a variable tio is initialized here and tio.c_cc[VMIN] becomes 1 (default value?). /* * set up the tty modes */ { #if defined(USE_SYSV_TERMIO) || defined(USE_POSIX_TERMIOS) #if defined(umips) || defined(CRAY) || defined(linux) /* If the control tty had its modes screwed around with, eg. by lineedit in the shell, or emacs, etc. then tio will have bad values. Let's just get termio from the new tty and tailor it. */ if (ioctl (tty, TCGETA, &tio) == -1) SysError (ERROR_TIOCGETP); tio.c_lflag |= ECHOE; #endif /* umips */