This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

BUG in termios/cfmakeraw.c or in Â17.4.10 of the manual


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.




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]