diff options
author | cjihrig <cjihrig@gmail.com> | 2019-01-18 13:37:29 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2019-01-21 10:28:17 -0500 |
commit | f698386c7e988ef45027a75b2ff988899ee2af1d (patch) | |
tree | 37d9c39baf7fb03e472701436410e8e461086174 /deps/uv/src/unix/aix.c | |
parent | 27871c35b685dd599710e57e76a66ee3a82c1e6d (diff) | |
download | android-node-v8-f698386c7e988ef45027a75b2ff988899ee2af1d.tar.gz android-node-v8-f698386c7e988ef45027a75b2ff988899ee2af1d.tar.bz2 android-node-v8-f698386c7e988ef45027a75b2ff988899ee2af1d.zip |
deps: upgrade to libuv 1.25.0
PR-URL: https://github.com/nodejs/node/pull/25571
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Diffstat (limited to 'deps/uv/src/unix/aix.c')
-rw-r--r-- | deps/uv/src/unix/aix.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/deps/uv/src/unix/aix.c b/deps/uv/src/unix/aix.c index 44c9cf5b63..337e58e0ad 100644 --- a/deps/uv/src/unix/aix.c +++ b/deps/uv/src/unix/aix.c @@ -555,7 +555,7 @@ static int uv__setup_ahafs(const char* filename, int *fd) { sprintf(mon_file_write_string, "CHANGED=YES;WAIT_TYPE=WAIT_IN_SELECT;INFO_LVL=1"); rc = write(*fd, mon_file_write_string, strlen(mon_file_write_string)+1); - if (rc < 0) + if (rc < 0 && errno != EBUSY) return UV__ERR(errno); return 0; @@ -728,10 +728,16 @@ int uv_fs_event_start(uv_fs_event_t* handle, char cwd[PATH_MAX]; char absolute_path[PATH_MAX]; char readlink_cwd[PATH_MAX]; + struct timeval zt; + fd_set pollfd; /* Figure out whether filename is absolute or not */ - if (filename[0] == '/') { + if (filename[0] == '\0') { + /* Missing a pathname */ + return UV_ENOENT; + } + else if (filename[0] == '/') { /* We have absolute pathname */ /* TODO(bnoordhuis) Check uv__strscpy() return value. */ uv__strscpy(absolute_path, filename, sizeof(absolute_path)); @@ -768,6 +774,15 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv__io_start(handle->loop, &handle->event_watcher, POLLIN); + /* AHAFS wants someone to poll for it to start mointoring. + * so kick-start it so that we don't miss an event in the + * eventuality of an event that occurs in the current loop. */ + do { + memset(&zt, 0, sizeof(zt)); + FD_ZERO(&pollfd); + FD_SET(fd, &pollfd); + rc = select(fd + 1, &pollfd, NULL, NULL, &zt); + } while (rc == -1 && errno == EINTR); return 0; #else return UV_ENOSYS; |