aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJuan José <soyjuanarbol@gmail.com>2025-04-23 16:24:52 -0500
committerGitHub <noreply@github.com>2025-04-23 23:24:52 +0200
commite6c0007fae73d8efcd61f45e2b5da911732c89fb (patch)
tree1ba57e37e461bdf70a99f1141840ad0d72c0ecfa /src
parent414a5e7333cc47acef4626e55719059dddb6850c (diff)
downloadlibuv-e6c0007fae73d8efcd61f45e2b5da911732c89fb.tar.gz
libuv-e6c0007fae73d8efcd61f45e2b5da911732c89fb.zip
sunos: improve fs event watcher OOM handling (#4759)
Propagate errors from uv__io_init_start() back to the caller. Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/unix/sunos.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/unix/sunos.c b/src/unix/sunos.c
index 84ce52a2..6c38c31a 100644
--- a/src/unix/sunos.c
+++ b/src/unix/sunos.c
@@ -546,8 +546,15 @@ int uv_fs_event_start(uv_fs_event_t* handle,
}
if (first_run) {
- uv__io_init(&handle->loop->fs_event_watcher, uv__fs_event_read, portfd);
- uv__io_start(handle->loop, &handle->loop->fs_event_watcher, POLLIN);
+ err = uv__io_init_start(handle->loop,
+ &handle->loop->fs_event_watcher,
+ uv__fs_event_read,
+ portfd,
+ POLLIN);
+ if (err)
+ uv__handle_stop(handle);
+
+ return err;
}
return 0;