The docs leave much to be desired and are misleading. The second arg should be called amode or mode to line up with what's in the man page (currently it's flags which is a 4th arg to the long-form in the linux man page that is unrelated). Also it appears through testing that the only non-error result is 0 and all other results are uv errors. This is fine behavior, but it's taken me a while to figure out how this works or what it's even for.
Hi Tim! I fixed the parameter name in e03c0c7. As for the return code, same rule as any other libuv function applies, as documented: < 0 means error, success otherwise (which is usually 0).
The docs leave much to be desired and are misleading. The second arg should be called
amode
ormode
to line up with what's in the man page (currently it'sflags
which is a 4th arg to the long-form in the linux man page that is unrelated). Also it appears through testing that the only non-error result is0
and all other results are uv errors. This is fine behavior, but it's taken me a while to figure out how this works or what it's even for.