Subject: bin/70: stty prints bogus warning if -f option used.
To: None <gnats-admin>
From: None <sommerfeld@orchard.medford.ma.us>
List: netbsd-bugs
Date: 01/13/1994 11:05:10
>Number:         70
>Category:       bin
>Synopsis:       stty prints bogus warning if -f option used.
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gnats-admin (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 13 11:05:08 1994
>Originator:     Bill Sommerfeld
>Organization:
	none.
>Release:        -current
>Environment:
System: NetBSD orchard.medford.ma.us 0.9a ORCHARD#3 i386

>Description:
	"stty -f /dev/tty05 >/dev/tty05" prints the warning:

stdout appears redirected, but stdin is the control descriptor

>How-To-Repeat:
	see above.
>Fix:
	Don't print the message if -f is used.

*** 1.1	1994/01/13 18:33:08
--- 1.2	1994/01/13 18:34:07
***************
*** 99,105 ****
  	if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0)
  		warn("TIOCGWINSZ: %s\n", strerror(errno));
  
! 	checkredirect();			/* conversion aid */
  
  	switch(fmt) {
  	case NOTSET:
--- 99,106 ----
  	if (ioctl(i.fd, TIOCGWINSZ, &i.win) < 0)
  		warn("TIOCGWINSZ: %s\n", strerror(errno));
  
! 	if (i.fd == STDIN_FILENO)
! 		checkredirect();			/* conversion aid */
  
  	switch(fmt) {
  	case NOTSET:

>Audit-Trail:
>Unformatted:

------------------------------------------------------------------------------