[PATCH v3 4/5] ntdll: Return STATUS_PENDING from NtWriteFile() for async write.
Paul Gofman
gofmanp at gmail.com
Wed Feb 27 14:16:47 CST 2019
On 2/27/19 21:28, Jacek Caban wrote:
>
>
> I don't know, is STATUS_PENDING specific to regular files?
>
No, it is not specific. ntdll read / write can aleady return either
_PENDING or _SUCCESS for special files, depending on whether the
operation is actually performed asynchronously. But regular file
operations are currently never queued asynchronously in Wine. In the
bugs I am aware of the application expects _PENDING just for regular
files. I suppose it is not something to be unified across different file
handle types. If you agree with that it is probably much easier to deal
with regular files without relation to other cases.
>
>
> More like a code that calls ReadFile on a handle passed from an
> application that happens to be overlapped. Or overlapped file handle
> is created by accident, since with current code it doesn't matter for
> file handles. Anyway, it doesn't seem likely.
>
>
>
I think I can grep for read / write file calls and check cases which
seem suspicious in this regard. The amount of read / write calls must be
huge but hopefully there are limited number of places where _OVERLAPPED
is used explicitly or read / write on app provided handle is used.
More information about the wine-devel
mailing list