Close the fd to wake the reading thread up for termination