GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: cherry-pick libuv/libuv@abb109f · nodejs/node@cc8d542

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • deps/uv/src/unix
    • stream.c
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎deps/uv/src/unix/stream.c‎

Copy file name to clipboardExpand all lines: deps/uv/src/unix/stream.c
+3-17Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,20 +58,6 @@ struct uv__stream_select_s {
5858
fd_set* swrite;
5959
size_t swrite_sz;
6060
};
61-
62-
/* Due to a possible kernel bug at least in OS X 10.10 "Yosemite",
63-
* EPROTOTYPE can be returned while trying to write to a socket that is
64-
* shutting down. If we retry the write, we should get the expected EPIPE
65-
* instead.
66-
*/
67-
# define RETRY_ON_WRITE_ERROR(errno) (errno == EINTR || errno == EPROTOTYPE)
68-
# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \
69-
(errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS || \
70-
(errno == EMSGSIZE && send_handle != NULL))
71-
#else
72-
# define RETRY_ON_WRITE_ERROR(errno) (errno == EINTR)
73-
# define IS_TRANSIENT_WRITE_ERROR(errno, send_handle) \
74-
(errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS)
7561
#endif /* defined(__APPLE__) */
7662

7763
static void uv__stream_connect(uv_stream_t*);
@@ -866,17 +852,17 @@ static int uv__try_write(uv_stream_t* stream,
866852

867853
do
868854
n = sendmsg(uv__stream_fd(stream), &msg, 0);
869-
while (n == -1 && RETRY_ON_WRITE_ERROR(errno));
855+
while (n == -1 && errno == EINTR);
870856
} else {
871857
do
872858
n = uv__writev(uv__stream_fd(stream), iov, iovcnt);
873-
while (n == -1 && RETRY_ON_WRITE_ERROR(errno));
859+
while (n == -1 && errno == EINTR);
874860
}
875861

876862
if (n >= 0)
877863
return n;
878864

879-
if (IS_TRANSIENT_WRITE_ERROR(errno, send_handle))
865+
if (errno == EAGAIN || errno == EWOULDBLOCK || errno == ENOBUFS)
880866
return UV_EAGAIN;
881867

882868
return UV__ERR(errno);

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.