How to implement a timeout in read() function call? How to implement a timeout in read() function call? c c