Use select for non blocking read on file descriptor