use poll instead of select in linux os