BUG in termios/cfmakeraw.c or in §17.4.10 of the manual
paul.chavent@fnac.net
paul.chavent@fnac.net
Fri Jan 22 17:21:00 GMT 2010
The manual says (about function cfmakeraw) it does exactly this :
termios-p->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP
|INLCR|IGNCR|ICRNL|IXON);
termios-p->c_oflag &= ~OPOST;
termios-p->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
termios-p->c_cflag &= ~(CSIZE|PARENB);
termios-p->c_cflag |= CS8;
But the termios/cfmakeraw.c is :
t->c_iflag &= ~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON);
t->c_oflag &= ~OPOST;
t->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN);
t->c_cflag &= ~(CSIZE|PARENB);
t->c_cflag |= CS8;
t->c_cc[VMIN] = 1; /* read returns when one char is available. */
t->c_cc[VTIME] = 0;
So if we set c_cc[VMIN] and/or c_cc[VTIME] before calling cfmakeraw, we lose our settings without being informed.
I can send a patch, if you tell me what to change : the manual or the source ?
Thanks.
Paul.
More information about the Libc-help
mailing list