-
Notifications
You must be signed in to change notification settings - Fork 41
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
Need more configurability in fd handling behavior #644
Comments
If I understood correctly, |
The problem is more that I can't (safely) create the |
...why? How do you get the control messages without also getting the FDs that they refer to? And how are you creating the I feel like I do not understand what is going on here. Do you have some code that I could look at? |
I have an rr[0] recording of a process. That recording contains the results and memory written by each syscall, so from that I can reconstruct the traffic over the x11 socket. I have the complete Right now I don't create any |
Ah, thanks for that info. That clears things up a bit. So... basically, it is impossible to get the FDs correct... I guess
Is that required for anything? Or do you want to avoid having to patch the Uhm... I'm not really sure how you are going about this, but why are the Since this is just about parsing, I would expect that |
It's not strictly required but I think it would be better to preserve the fd numbers if possible so that the output matches the original program precisely.
The
Yeah, For the time being I'm just carrying a fork with a changeset that comments out the parts of |
So I have a program that uses x11rb to implement xtrace-like functionality on copies of the data that flows over the x11 socket. When I parse messages I have copies of them but the fds don't actually exist in my program. RawFdContainer will try to close fds when it goes out of scope which could stomp on other fds in my process.
The most correct solution here is probably to replace RawFdContainer with a FdType parameter for all of the functions and structs that use it for encoding/decoding. (A dynamic trait probably won't work because there are structs that #[derive(Eq)] with RawFdContainer and Eq is not an object-safe trait). That's going to be rather invasive though. So I'd like to know if that's something you'd be open to before I do any work. If not, I'll just keep a local fork with the
close
in RawFdContainer patched out.The text was updated successfully, but these errors were encountered: