[PATCH 2/8] ntdll: rework the handling of server ioctls a little bit to avoid a crash with later patches

Alexandre Julliard julliard at winehq.org
Thu Jul 28 12:46:03 CDT 2011


Bernhard Loos <bernhardloos at googlemail.com> writes:

> @@ -1273,10 +1282,16 @@ static NTSTATUS server_ioctl_file( HANDLE handle, HANDLE event,
>  
>      if (wait_handle)
>      {
> -        NtWaitForSingleObject( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), NULL );
> -        status = io->u.Status;
> +        status = NtWaitForSingleObject( wait_handle, (options & FILE_SYNCHRONOUS_IO_ALERT), NULL );
> +        if (status == STATUS_USER_APC)
> +        {
> +            async->interrupted = TRUE;
> +            status = STATUS_CANCELLED; /* not really, the ioctl completes and event and the handle
> +                                          itself get signaled */
> +        }

This looks wrong. You can't claim it was cancelled if it's still
running.

-- 
Alexandre Julliard
julliard at winehq.org



More information about the wine-devel mailing list