This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
BUG in termios/cfmakeraw.c or in Â17.4.10 of the manual
- From: <paul dot chavent at fnac dot net>
- To: libc-help at sourceware dot org
- Date: Fri, 22 Jan 2010 18:20:51 +0100 (CET)
- Subject: BUG in termios/cfmakeraw.c or in Â17.4.10 of the manual
- Reply-to: <paul dot chavent at fnac dot net>
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.