Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

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

Saúl Ibarra Corretgé
Saúl Ibarra Corretgé
Owner

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

Saúl Ibarra Corretgé
Owner

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

Saúl Ibarra Corretgé saghul closed this
Saúl Ibarra Corretgé saghul deleted the 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.
10 src/unix/kqueue.c
View
@@ -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;
10 src/unix/linux/linux-core.c
View
@@ -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;
12 src/unix/sunos.c
View
@@ -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.