I have a simple piece of code that periodically writes data to a fd that\'s passed to it. The fd will most likely be a pipe or socket but could potentially be anything. I can de
Try with select and its errorfds parameter:
int **select**(int nfds, fd_set *restrict readfds, fd_set *restrict writefds, **fd_set *restrict errorfds**, struct timeval *restrict timeout);