uv: upgrade to 0fb3769
This commit is contained in:
parent
818f0cba55
commit
52eaac4382
4
deps/uv/src/unix/core.c
vendored
4
deps/uv/src/unix/core.c
vendored
@ -599,7 +599,11 @@ static int uv_getaddrinfo_done(eio_req* req) {
|
|||||||
|
|
||||||
if (handle->retcode == 0) {
|
if (handle->retcode == 0) {
|
||||||
/* OK */
|
/* OK */
|
||||||
|
#if EAI_NODATA /* FreeBSD deprecated EAI_NODATA */
|
||||||
} else if (handle->retcode == EAI_NONAME || handle->retcode == EAI_NODATA) {
|
} else if (handle->retcode == EAI_NONAME || handle->retcode == EAI_NODATA) {
|
||||||
|
#else
|
||||||
|
} else if (handle->retcode == EAI_NONAME) {
|
||||||
|
#endif
|
||||||
uv__set_sys_error(handle->loop, ENOENT); /* FIXME compatibility hack */
|
uv__set_sys_error(handle->loop, ENOENT); /* FIXME compatibility hack */
|
||||||
} else {
|
} else {
|
||||||
handle->loop->last_err.code = UV_EADDRINFO;
|
handle->loop->last_err.code = UV_EADDRINFO;
|
||||||
|
4
deps/uv/src/win/fs-event.c
vendored
4
deps/uv/src/win/fs-event.c
vendored
@ -353,7 +353,9 @@ void uv_process_fs_event_req(uv_loop_t* loop, uv_req_t* req,
|
|||||||
offset = file_info->NextEntryOffset;
|
offset = file_info->NextEntryOffset;
|
||||||
} while(offset);
|
} while(offset);
|
||||||
} else {
|
} else {
|
||||||
handle->cb(handle, NULL, UV_CHANGE, 0);
|
if (!(handle->flags & UV_HANDLE_CLOSING)) {
|
||||||
|
handle->cb(handle, NULL, UV_CHANGE, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uv__set_sys_error(loop, GET_REQ_ERROR(req));
|
uv__set_sys_error(loop, GET_REQ_ERROR(req));
|
||||||
|
29
deps/uv/test/test-fs-event.c
vendored
29
deps/uv/test/test-fs-event.c
vendored
@ -235,3 +235,32 @@ TEST_IMPL(fs_event_watch_file_current_dir) {
|
|||||||
r = uv_fs_unlink(loop, &fs_req, "watch_file", NULL);
|
r = uv_fs_unlink(loop, &fs_req, "watch_file", NULL);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TEST_IMPL(fs_event_no_callback_on_close) {
|
||||||
|
uv_fs_t fs_req;
|
||||||
|
uv_loop_t* loop = uv_default_loop();
|
||||||
|
int r;
|
||||||
|
|
||||||
|
/* Setup */
|
||||||
|
uv_fs_unlink(loop, &fs_req, "watch_dir/file1", NULL);
|
||||||
|
uv_fs_rmdir(loop, &fs_req, "watch_dir", NULL);
|
||||||
|
create_dir(loop, "watch_dir");
|
||||||
|
create_file(loop, "watch_dir/file1");
|
||||||
|
|
||||||
|
r = uv_fs_event_init(loop, &fs_event, "watch_dir/file1", fs_event_cb_file);
|
||||||
|
ASSERT(r != -1);
|
||||||
|
|
||||||
|
uv_close((uv_handle_t*)&fs_event, close_cb);
|
||||||
|
|
||||||
|
uv_run(loop);
|
||||||
|
|
||||||
|
ASSERT(fs_event_cb_called == 0);
|
||||||
|
ASSERT(close_cb_called == 1);
|
||||||
|
|
||||||
|
/* Cleanup */
|
||||||
|
r = uv_fs_unlink(loop, &fs_req, "watch_dir/file1", NULL);
|
||||||
|
r = uv_fs_rmdir(loop, &fs_req, "watch_dir", NULL);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
2
deps/uv/test/test-list.h
vendored
2
deps/uv/test/test-list.h
vendored
@ -106,6 +106,7 @@ TEST_DECLARE (fs_stat_missing_path)
|
|||||||
TEST_DECLARE (fs_event_watch_dir)
|
TEST_DECLARE (fs_event_watch_dir)
|
||||||
TEST_DECLARE (fs_event_watch_file)
|
TEST_DECLARE (fs_event_watch_file)
|
||||||
TEST_DECLARE (fs_event_watch_file_current_dir)
|
TEST_DECLARE (fs_event_watch_file_current_dir)
|
||||||
|
TEST_DECLARE (fs_event_no_callback_on_close)
|
||||||
TEST_DECLARE (fs_readdir_empty_dir)
|
TEST_DECLARE (fs_readdir_empty_dir)
|
||||||
TEST_DECLARE (fs_readdir_file)
|
TEST_DECLARE (fs_readdir_file)
|
||||||
TEST_DECLARE (fs_open_dir)
|
TEST_DECLARE (fs_open_dir)
|
||||||
@ -252,6 +253,7 @@ TASK_LIST_START
|
|||||||
TEST_ENTRY (fs_event_watch_dir)
|
TEST_ENTRY (fs_event_watch_dir)
|
||||||
TEST_ENTRY (fs_event_watch_file)
|
TEST_ENTRY (fs_event_watch_file)
|
||||||
TEST_ENTRY (fs_event_watch_file_current_dir)
|
TEST_ENTRY (fs_event_watch_file_current_dir)
|
||||||
|
TEST_ENTRY (fs_event_no_callback_on_close)
|
||||||
TEST_ENTRY (fs_readdir_empty_dir)
|
TEST_ENTRY (fs_readdir_empty_dir)
|
||||||
TEST_ENTRY (fs_readdir_file)
|
TEST_ENTRY (fs_readdir_file)
|
||||||
TEST_ENTRY (fs_open_dir)
|
TEST_ENTRY (fs_open_dir)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user