Skip to content

simterpose should not leak FDs #5

Description

@mquinson

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions