add result detect for set nonblocking.