Example code of non-blocking IO for Linux