a more correct approach would be to track state fo...
# general
a
a more correct approach would be to track state for each file descriptor (similar to what is happening in process_file_events)