fails:IO.for_fd raises EINVAL if mode is not compatible with the descriptor's current mode
fails:IO.for_fd cannot open an IO with incompatible flags
