I read kernel's source, there is sk_err_soft and sk_err ÂinÂstruct sock. this is their comment:
ÂÂ* @sk_err: last error
ÂÂ* @sk_err_soft: errors that don't cause failure but are the cause of a
ÂÂ* Â Â Âpersistent failure not just 'timed out'
I search linux kernel tree, and find use sk_err_soft Âin ICMP module.
after that in man 2 connect :
EINPROGRESS
ÂÂ Â Â Â Â Â ÂThe socket is nonblocking and the connection cannot be completed immediately. ÂIt is possible to select(2) or Âpoll(2) Âfor Âcompletion Âby
ÂÂ Â Â Â Â Â Âselecting the socket for writing. ÂAfter select(2) indicates writability, use getsockopt(2) to read the SO_ERROR option at level SOL_SOCKET
ÂÂ Â Â Â Â Â Âto determine whether connect() completed successfully (SO_ERROR is zero) or unsuccessfully (SO_ERROR is one of the usual error codes listed
ÂÂ Â Â Â Â Â Âhere, explaining the reason for the failure).
i knowÂSO_ERROR will detectÂsk_err_soft andÂsk_err, Âfurther moreÂthere is not detect sk_err_soft in tcp_poll.ÂÂmy question is why not return EPOLLERR in tcp_poll( detect sk_err_soft).
Thank!
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies