about summary refs log tree commit diff
path: root/tests/mir-opt/basic_assignment.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-19 11:22:28 +0000
committerbors <bors@rust-lang.org>2023-10-19 11:22:28 +0000
commit3fbcfd2b6f7030cb70328aa759107efc1516912c (patch)
tree2b0909db89321d58f8a7e6a5fc17d08338f4947c /tests/mir-opt/basic_assignment.rs
parenta01382dbea73c1442de1cf180333c273f82f710b (diff)
parentdfadd177a9738de289a3a6d4b39c08d94f384c1a (diff)
downloadrust-3fbcfd2b6f7030cb70328aa759107efc1516912c.tar.gz
rust-3fbcfd2b6f7030cb70328aa759107efc1516912c.zip
Auto merge of #116132 - darthunix:connect_poll, r=cuviper
Make TCP connect handle EINTR correctly

According to the [POSIX](https://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html) standard, 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. When the connection has been established asynchronously, select() and poll() shall indicate that the file descriptor for the socket is ready for writing.

The previous implementation differs from the recomendation: in a case of the EINTR we tried to reconnect in a loop and sometimes get EISCONN error (this problem was originally detected on MacOS).

1. More details about the problem in an [article](http://www.madore.org/~david/computers/connect-intr.html).
2. The original [issue](https://git.picodata.io/picodata/picodata/tarantool-module/-/issues/157).
Diffstat (limited to 'tests/mir-opt/basic_assignment.rs')
0 files changed, 0 insertions, 0 deletions