Subject: kern/12048: interrupted TIOCSETAW returns with ENOTTY
To: None <gnats-bugs@gnats.netbsd.org>
From: None <hash@iij.ad.jp>
List: netbsd-bugs
Date: 01/26/2001 04:43:33
>Number: 12048
>Category: kern
>Synopsis: interrupted TIOCSETAW returns with ENOTTY
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 26 04:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 1.4.1, 1.5, 1.5K, 1.5Q
>Organization:
Internet Initiative Japan Inc.
>Environment:
System: NetBSD rtinit.iij.ad.jp 1.5K NetBSD 1.5K (RTINIT) #20: Fri Nov 24 04:43:17 JST 2000 root@rtinit.iij.ad.jp:/var/sources/src/sys/arch/i386/compile/RTINIT i386
Architecture: i386
Machine: i386
>Description:
Interrupted TIOCSETAW returns with ENOTTY
when SIGINT handler is installed.
>How-To-Repeat:
Configure the host as a serial-console terminal(9600bps),
and login on its serial console.
Execute following program and type Ctrl-C when you see "Fire!"
--
#include <stdio.h>
#include <errno.h>
#include <signal.h>
#include <termios.h>
void intr(int);
int main(int, char **);
void
intr(int signo)
{
}
int
main(int ac, char **av)
{
int rv;
int i;
siginterrupt(SIGINT, 0);
signal(SIGINT, intr);
for( i = 0; i < 20; i++ ){
printf(
"012345678901234567890123456789"
"012345678901234567890123456789"
"0123456789\n");
if( i == 16 )
printf("Fire!\n");
}
rv = tcdrain(1);
if( rv == -1 )
printf("tcdrain() = %d, errno = %d\n", rv, errno);
else
printf("tcdrain() = %d\n", rv);
printf("done\n");
return 0;
}
--
>Fix:
problem has been already fixed in FreeBSD:
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=101758+0+archive/1997/cvs-sys/19971130.cvs-sys
http://docs.freebsd.org/cgi/getmsg.cgi?fetch=106385+0+archive/1997/cvs-sys/19971130.cvs-sys
>Release-Note:
>Audit-Trail:
>Unformatted: