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.
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.