Use /dev/null in invalidate_fd to avoid infinite loop in OpenSSL