diff options
author | Nobuyoshi Nakada <[email protected]> | 2024-09-03 20:19:55 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <[email protected]> | 2024-09-04 10:42:48 +0900 |
commit | 37d7ae06afb03ae5508bfd81033961559886bd6b (patch) | |
tree | 2f13ca5e917a45c2296b36c8d5473bc8a5dc71bc /io.c | |
parent | ade240e5785eac173978304ca9acfe10d08f057e (diff) |
[Bug #20708] Retry `open` on EINTR
Co-Authored-By: Martin Dorey <[email protected]>
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11537
Diffstat (limited to 'io.c')
-rw-r--r-- | io.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -6956,7 +6956,10 @@ sysopen_func(void *ptr) static inline int rb_sysopen_internal(struct sysopen_struct *data) { - int fd = IO_WITHOUT_GVL_INT(sysopen_func, data); + int fd; + do { + fd = IO_WITHOUT_GVL_INT(sysopen_func, data); + } while (fd < 0 && errno == EINTR); if (0 <= fd) rb_update_max_fd(fd); return fd; |