+ else if (status == STATUS_INVALID_HANDLE) + { + return status; + } + + /* TODO: Add a test for the timing of setting IOSB values? It's tricky + * since we probably have to check from a different thread without using + * win32 IPC for synchronization to avoid syncing on system APC + * execution. */ + io_status->Status = status; + io_status->Information = 0; + return status;
I guess it doesn't make a difference here, but more generally the iosb is set on !NT_ERROR(status), so that may be more idiomatic to write instead of checking for STATUS_INVALID_HANDLE specifically.
Annoyingly it does matter here: one of the tests in 7/8 fails with the change (specifically, the cancel operation IOSB is in fact updated for STATUS_NOT_FOUND).