闹钟大魔王

Results 16 comments of 闹钟大魔王

@zahash I think we can try using `mmap_anonymous` https://docs.rs/nix/latest/nix/sys/mman/fn.mmap_anonymous.html

> what if one of those variables is dropped? will the file close? if thats the case, then thats a big problem because having a OwnedFd instance assumes that the...

> but the OwnedFd calls close on the wrapped RawFd when dropped. @zahash The try_clone method of OwnedFd ultimately calls a syscall similar to dup2, so in the end, there...

@zahash, have you considered the possibility of a FD leak here? container_main_process.rs ```rust pub fn container_main_process(container_args: &ContainerArgs) -> Result { ... let cb: CloneCb = { let container_args = container_args.clone();...

I think it seems only the parent process can reach this point. Additionally, this is still dropping CloneCb rather than releasing data outside of the closure.

@zahash Here's my understanding of execution steps, but it might not be accurate... 1. When creating `CloneCb`, `container_args` along with its internal `OwnedFd` are cloned, and then moved into the...