#5269·libuv

OpenBSD 8.0 to gain native support for retrieving the exec_path

Author: VlkrSCreated Sep 9, 2026Updated Sep 10, 2026

This is in reference to https://github.com/libuv/libuv/pull/5022 as well as https://github.com/libuv/libuv/commit/555a9647a079e3a084c19850011112a644651f9a and https://github.com/libuv/libuv/commit/885b1ecda0037fcb6647e8d69a914347ad884244

The upcoming release of OpenBSD will have native support for getexecpath(3) allowing for a proper implementation of uv_exepath() without the current workaround.

I am currently preparing a patch for the OpenBSD port of libuv to use that in lieu of the current implementation. I understand from other implementations and specifically https://github.com/libuv/libuv/commit/555a9647a079e3a084c19850011112a644651f9a and https://github.com/libuv/libuv/commit/885b1ecda0037fcb6647e8d69a914347ad884244 , that the currently expected behavior of uv_exepath() is to return a truncated path if the chosen buffer is too small to fit the full path.

However we would prefer the OpenBSD implementation to return an error in this case, plus we believe that there are cases where using an accidentally truncated path can be dangerous. See the related discussion on the OpenBSD-ports mailing list here and here.

Would you accept a patch (once OpenBSD 8.0 is released) that leads to libuv behaving differently on OpenBSD than on other platforms?