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>
This commit is contained in:
Juan José 2025-04-23 16:24:52 -05:00 committed by GitHub
parent 414a5e7333
commit e6c0007fae
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;