You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It turns out that the way I thought descriptors were allocated on Linux was completely incorrect, see for example jaspervdj/websockets-snap#10. Since descriptors are in fact likely to be soon reused whenever there is even a modest amount of descriptor churn, I do think it would be a good idea to protect against use-after-close faults.
This could be accomplished by adding an MVar Bool to the Inotify structure representing the descriptor, or by storing the descriptor itself inside a MVar (Maybe Fd). As a side benefit, it would also make it possible to make all the other operators thread-safe.
The text was updated successfully, but these errors were encountered:
It turns out that the way I thought descriptors were allocated on Linux was completely incorrect, see for example jaspervdj/websockets-snap#10. Since descriptors are in fact likely to be soon reused whenever there is even a modest amount of descriptor churn, I do think it would be a good idea to protect against use-after-close faults.
This could be accomplished by adding an
MVar Bool
to theInotify
structure representing the descriptor, or by storing the descriptor itself inside aMVar (Maybe Fd)
. As a side benefit, it would also make it possible to make all the other operators thread-safe.The text was updated successfully, but these errors were encountered: