rust/library/std/src/sys_common
bors 3fbcfd2b6f 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).
2023-10-19 11:22:28 +00:00
..
memchr Move std::memchr to sys_common 2021-05-14 03:54:46 +02:00
net Match unmatched backticks in library/ 2023-03-03 03:03:29 +01:00
once std: optimize LazyLock size 2023-01-26 16:16:03 +01:00
thread_local_key Update test. 2023-04-27 15:25:48 +02:00
thread_parking std: synchronize with all calls to unpark in id-based thread parker 2023-08-07 19:13:34 +02:00
wtf8 Rollup merge of #98202 - aticu:impl_tryfrom_osstr_for_str, r=Amanieu 2023-06-14 18:10:27 +02:00
backtrace.rs print omitted frames count for short backtrace mode 2023-07-29 20:36:05 +08:00
fs.rs Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
io.rs Update rand in the stdlib tests, and remove the getrandom feature from it 2023-01-04 14:52:41 -08:00
lazy_box.rs Leak pthreax_mutex_t when it's dropped while locked. 2022-06-16 12:09:12 +02:00
memchr.rs Move std::memchr to sys_common 2021-05-14 03:54:46 +02:00
mod.rs Fixes from PR 2023-09-22 17:23:32 +05:30
net.rs Make TCP connect() handle EINTR correctly 2023-10-13 18:12:56 +07:00
process.rs also print clearing the environment entirely 2023-08-24 08:08:46 +02:00
tests.rs std: move "mod tests/benches" to separate files 2020-08-31 02:56:59 +00:00
thread.rs Relax memory ordering used in min_stack 2022-05-01 15:55:54 -07:00
thread_info.rs Refactor thread_info to remove the RefCell 2023-09-11 14:11:37 -04:00
thread_local_dtor.rs std: abort instead of panicking if the global allocator uses TLS 2023-10-04 11:49:48 +02:00
thread_local_key.rs Remove unused std::sys_common::thread_local_key::Key. 2023-04-27 15:25:48 +02:00
wstr.rs Extract WStrUnits to sys_common::wstr 2022-11-28 21:17:08 +05:30
wtf8.rs std: add some missing repr(transparent) 2023-08-14 10:40:59 +02:00