I'm working with Linux UDP sockets and need to identify scenarios where socket descriptors become invalid due to OS intervention rather than application errors, i.e. where the application can get EBADF/ENOTASOCK error, with no fault of application.
I have gone through the sockets API, but couldn't find anything specific mentioned about socket resources getting reclaimed/closed by the OS.