Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

unix: Make a loop iteration if polling is interrupted by a signal #672

Closed
wants to merge 1 commit into from

1 participant

@saghul

Possible fix for #671. Take with a grain of salt ;-)

@saghul

Looks like this may not be needed after all, see comments on #671.

@saghul saghul closed this
@saghul saghul deleted the unknown repository branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
10 src/unix/kqueue.c
@@ -150,14 +150,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
if (errno != EINTR)
abort();
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
- /* Interrupted by a signal. Update timeout and poll again. */
- goto update_timeout;
+ return;
}
nevents = 0;
@@ -241,7 +234,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
if (timeout == -1)
continue;
-update_timeout:
assert(timeout > 0);
diff = uv_hrtime() / 1000000;
View
10 src/unix/linux/linux-core.c
@@ -191,14 +191,7 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
if (errno != EINTR)
abort();
- if (timeout == -1)
- continue;
-
- if (timeout == 0)
- return;
-
- /* Interrupted by a signal. Update timeout and poll again. */
- goto update_timeout;
+ return;
}
nevents = 0;
@@ -240,7 +233,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
if (timeout == -1)
continue;
-update_timeout:
assert(timeout > 0);
diff = uv_hrtime() / 1000000;
View
12 src/unix/sunos.c
@@ -150,15 +150,8 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
abort();
}
- if (events[0].portev_source == 0) {
- if (timeout == 0)
- return;
-
- if (timeout == -1)
- continue;
-
- goto update_timeout;
- }
+ if (events[0].portev_source == 0)
+ return;
if (nfds == 0) {
assert(timeout != -1);
@@ -208,7 +201,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) {
if (timeout == -1)
continue;
-update_timeout:
assert(timeout > 0);
diff = uv_hrtime() / 1000000;
Something went wrong with that request. Please try again.