Get rid of fd_mode_t, use three handler pointers instead.