Dan Gohman

Results 1066 comments of Dan Gohman

It's not necessarily one Unix user attacking another. It can also be a user typing `make` and then doing other stuff while they wait. Or a cron job that scanning...

A similar issue that came up earlier was IPv6 addresses, which would want to use `[u16; 8]`.

`OwnedFd` has been [upstreamed into std](https://doc.rust-lang.org/stable/std/os/fd/struct.OwnedFd.html), so the place to request new features for it is in std. The panic in `rustix::io::close` is only a `debug_assert_eq`, so it's not included...

I'm not clear on how we might explain to users when they should use this `rustix::io::try_close`, versus using `rustix::io::close` or using `OwnedFd` to close things. Could you say more about...

> almost always it's safe to ignore return result What does "almost" mean here? How would a programmer determine if their situation is one is one of the ones where...

After more consideration, I've now submitted https://github.com/bytecodealliance/rustix/pull/1085 to add a `try_close` function. Enable the "try_clone" cargo feature to use it. Also, I am someone who has read the platform documentation...

Since we're planning on having `mprotect`, that functionality should suffice for this feature.

@jfbastien Once we have `mprotect`, that'll be able to do exactly what we want here, so it's desirable to avoid adding a separate mechanism that will then become obsolete. @JSStats...

This feature is now being worked on in the [memory-control proposal](https://github.com/WebAssembly/memory-control/blob/main/proposals/memory-control/Overview.md).