Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

simterpose should not leak FDs #5

Open
mquinson opened this issue Oct 17, 2014 · 0 comments
Open

simterpose should not leak FDs #5

mquinson opened this issue Oct 17, 2014 · 0 comments
Labels

Comments

@mquinson
Copy link
Owner

Right now, the sockets and file descriptors opened by the main simterpose process are leaked into the childs when we fork. In order to keep the strace output aligned, we have to plan funny games such as

https://github.com/mquinson/simterpose/blob/master/src/simterpose.c#L172

This is ugly and should be removed. Instead, the file descriptors must be passed the CLOEXEC flag so that they get closed automatically on exec().

You can see whether your work is doing the trick by removing the manual closing stuff (pointed above) and running one of our tests (such as cd tests; make diff-msg) If you see a "open() = 3" in strace that become a "open() = 4" in simterpose, then you are leaking FDs.

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

No branches or pull requests

2 participants