@ theNbomr: Thanks!
Actually I setted also VTIME!=0 so after a while the program stops reading the port.
ANother question:
After using my silly program I have the prompt messed up, like
xxx/home>
xxx/home>
xxx/home>
if I press enter and I don't see what I write!
Maybe it's because of the program code?
Quote:
tcsetattr(STDOUT_FILENO,TCSANOW, &stdio);
tcsetattr(STDOUT_FILENO, TCSAFLUSH, &stdio);
tcsetattr(fd, TCSANOW, &options);
fcntl(fd, F_SETFL, 0);
|
Otherwise how can I time-out the reading in c?
Thanks in advance to anyone that will help me.
Best Regards
Ninaeve