Make Linux and Posix eventfd functions configurable#836
Conversation
|
I suspect this isn't needed (and you'll have the same problem with anything else that allocates FDs). It might be better to treat the user-facing numbers as labels that can map to any FD internally. e.g. when the user says |
|
Thanks @talex5!
True, but I think this is for shells to worry about and in practice not too many things need to do that (right now, I have a mostly working POSIX shell and only Eio is doing this).
My concern here is that this might break the semantics in some subtle ways. For example, consider this script: Whilst there might be noise in |
|
In your example, One other approach, that doesn't involve changing Eio's API, would be to open |
This is a very niche request, but I need to be able to control how the Linux and Posix backends for Eio create their "event FDs". In particular, I need to be able to ensure that they are safely moved to higher FD numbers in msh, a shell I am writing. This is a fairly common thing to do in shells (e.g. dash
savefd).