Skip to content
This repository has been archived by the owner on Aug 13, 2020. It is now read-only.

CDGC: Close / share file descriptors in the child process #24

Open
leandro-lucarella-sociomantic opened this issue Nov 6, 2017 · 1 comment
Labels

Comments

@leandro-lucarella-sociomantic
Copy link
Contributor

Coming from sociomantic-tsunami/dhtnode#25, there might be issues with file descriptors when they are closed in the mutator but the concurrent GC still have them opened.

To avoid this we should either close the FDs in the child (but this requires synchronization between the parent and child, and introduces a bigger pause) or we might just use clone() instead of fork() and actually share the file descriptors with CLONE_FILES (which should even make the forking slightly faster as there are less tables to copy). Since the child will never use those FDs, it should be safe.

@nemanja-boric-sociomantic
Copy link
Contributor

clone with CLONE_FILES sounds promising!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants