little-dude / netlink

netlink libraries for rust
Other
332 stars 89 forks source link

Must not return/unwind from ForkResult::Child branch (neither errors nor panics) #253

Closed stbuehler closed 2 years ago

stbuehler commented 2 years ago

I got Namespace error mkdir error: EACCES: Permission denied errors in the child processes, which were returned (and panicked on further up the stack); with the (forked!) tokio multithreaded runtime this somehow didn't actually kill the child process, so it blocks forever (I think it is waiting for the "worker threads" to exit, but they don't exist in the forked process).

I think the correct solution is that you should never unwind/return once you are in the child process (from the method that ran fork).