fdclean - erases cached info about a file descriptor
void fdclean(int fd);
This function drops any state that libdill associates with file descriptor fd. It has to be called before the file descriptor is closed. If it is not, the behavior is undefined.
It should also be used with file descriptors provided by third-party libraries, just before returning them back to their original owners.
int fds; pipe(fds); use_the_pipe(fds); fdclean(fds); close(fds); fdclean(fds); close(fds);