torsdag den 2 december 2010 klockan 12:27 skrev Robert Millan detta: > 2010/12/2 Mats Erik Andersson <[email protected]>: > > +# if defined(__GLIBC__) && defined(__FreeBSD_kernel__) > > +# define SCTTY_IOCTL > > +# endif > > Is this a kernel issue, a userland (libc) issue, or both? > > Issues affecting both kernel and userland are very uncommon. If it's > only kernel, please don't use __GLIBC__, it would just make it > harder for *BSD porters to identify the problem.
As far as I understand it, it must be both: The library used for GNU/kFreeBSD uses definitions of the baud rates B9600, B19200, and so on, whose values are the very decimal values the are supposed to represent, i.e., B9600 -> 9600. Using them in a termios c_cflag really destroys all sense of the termios setting. On the other hand, the system call "ioctl(fd, TIOCSCTTY, (void *) 0)" is necessary to get the controlling terminal, otherwise the process is not allowed to access "/dev/tty". Thus I judge the kernel to be involved. Exactly the same reasoning holds for standard FreeBSD and OpenBSD. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

