Bug 26817

Summary: isdnd in fullscreen-mode fails to detect read error from tty
Product: Base System Reporter: clement <clement>
Component: binAssignee: hm
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description clement 2001-04-24 14:40:01 UTC
	isdnd, when running in full-screen mode, fails to detect read errors fro
m its controlling tty (for exemple when the tty has been revoke()'d). It happens
 in a loop with a select() in it. The tty is in the read fd_set, and, when the 
tty's fd is no longer readable, isdnd fails to detect it and keep this fd in the
 read fd_set, causing select() to return immediately each time, and making isdnd
 use all CPU resources.

Because of the default value of isdn_fsdev in /etc/defaults/rc.conf, isdnd is 
launched by default in full-screen mode, on terminal /dev/ttyv4. getty(8) uses 
this console, so when getty is started, isdnd can no longer read /dev/ttyv4, 
and the problem described above happens.

Fix: Here is a patch for isdnd. If it can't read from its controlling termina
l, it puts an error in the log file and exits.(the patch is for the file main.c of isdnd, src/usr.sbin/i4b/isdnd/main.c)

How-To-Repeat: 	Configure isdn in kernel and isdnd, put isdn_enable in /etc/rc.conf.
Do not change the default value for isdn_fsdev, and reboot.
Comment 1 hm freebsd_committer freebsd_triage 2001-05-24 12:20:12 UTC
Responsible Changed
From-To: freebsd-bugs->hm

change to maintainer
Comment 2 hm freebsd_committer freebsd_triage 2001-06-05 16:17:30 UTC
State Changed
From-To: open->closed

Fix has been committed to -current.