3 ms·
> There is no useful errno variable to load in your own language's runtime after a call to, say, the open() function FWIW, in rust there is std::io::last_os_er
by Eikon 7y ago
> There is no useful errno variable to load in your own language's runtime after a call to, say, the open() function
FWIW, in rust there is std::io::last_os_error().
libc::perror works too.
- x3ro 7y agoThe point of the article is that there's glue code needed for this, I think. It seems like Rust also needs this, either through linker magic or extern C: https://github.com/rust-lang/rust/search?utf8=%E2%9C%93&q=errno&type= https://github.com/rust-lang/rust/search?utf8=%E2%9C%93&q=er...