Then why is it reporting events for the file descriptor (not description) that was closed? Am I misunderstanding that?
There's nothing wrong with dup'ing an fd and closing either the original one or the second one while continuing to use the other. It's very strange that something would emit events on the fd that was closed.
The confusion is this king the FD is the file. It is not.
Also a FD can't be open or closed it is simply in the FD lookup table is not. Files are what are opened and closed. A FD is a designation.
Open sets up the designation close removes it. So to say you are getting events on a fd is okay, but not painting the full picture. You are getting events from the kennel about a file and the kennel thinks you know this file by it's designation.
Closing a FD does not close a file unless it is the last FD referencing that file.
Also please see my other big post. I hate typing on a phone.