んですね。 全く知りませんでしたよ。。。
If connect() is interrupted by a signal that is caught while blocked waiting to establish a connection, connect() shall fail and set errno to [EINTR], but the connection request shall not be aborted, and the connection shall be established asynchronously. If the connection cannot be established immediately and O_NONBLOCK is set for the file descriptor for the socket, connect() shall fail and set errno to [EINPROGRESS], but the connection request shall not be aborted, and the connection shall be established asynchronously.
socket先がどんなデバイスか分からないんだから、非同期なのはある意味当然では?
pollingするのバカバカしいし。
でもさー、シグナル中断とかしたら接続行為自体がキャンセルされちゃうよーな気しないっすか?
しないっすか。。。