diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index 622b5de1cc5..2b62206c540 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -2661,8 +2661,8 @@ NTSTATUS WINAPI NtSetInformationFile(HANDLE handle, PIO_STATUS_BLOCK io, { FILE_IO_COMPLETION_NOTIFICATION_INFORMATION *info = ptr; - if (info->Flags & ~FILE_SKIP_COMPLETION_PORT_ON_SUCCESS) - FIXME( "Unsupported completion flags %x\n", info->Flags ); + if (info->Flags & FILE_SKIP_SET_USER_EVENT_ON_FAST_IO) + FIXME( "FILE_SKIP_SET_USER_EVENT_ON_FAST_IO not supported\n" ); SERVER_START_REQ( set_fd_completion_mode ) { diff --git a/dlls/ntdll/tests/pipe.c b/dlls/ntdll/tests/pipe.c index 08bde6da1dd..406d555d434 100644 --- a/dlls/ntdll/tests/pipe.c +++ b/dlls/ntdll/tests/pipe.c @@ -1423,12 +1423,10 @@ static void test_completion(void) info.Flags = FILE_SKIP_SET_EVENT_ON_HANDLE; status = pNtSetInformationFile(client, &io, &info, sizeof(info), FileIoCompletionNotificationInformation); ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status); - todo_wine ok(!is_signaled(client), "client is not signaled\n"); ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL); ok(ret, "WriteFile failed, error %u\n", GetLastError()); - todo_wine ok(!is_signaled(client), "client is signaled\n"); test_queued_completion(port, &io, STATUS_SUCCESS, sizeof(buf)); @@ -1439,12 +1437,10 @@ static void test_completion(void) ret = WriteFile(client, buf, 1, &num_bytes, NULL); ok(ret, "WriteFile failed, error %u\n", GetLastError()); - todo_wine ok(!is_signaled(client), "client is signaled\n"); ret = WriteFile(pipe, buf, sizeof(buf), &num_bytes, NULL); ok(ret, "WriteFile failed, error %u\n", GetLastError()); - todo_wine ok(!is_signaled(client), "client is signaled\n"); CloseHandle(port); diff --git a/server/fd.c b/server/fd.c index 119fae68668..fa174f597e3 100644 --- a/server/fd.c +++ b/server/fd.c @@ -1964,6 +1964,7 @@ int is_fd_removable( struct fd *fd ) /* set or clear the fd signaled state */ void set_fd_signaled( struct fd *fd, int signaled ) { + if (fd->comp_flags & FILE_SKIP_SET_EVENT_ON_HANDLE) return; fd->signaled = signaled; if (signaled) wake_up( fd->user, 0 ); } @@ -2647,7 +2648,9 @@ DECL_HANDLER(set_fd_completion_mode) { if (is_fd_overlapped( fd )) { - /* removing COMPLETION_SKIP_ON_SUCCESS is not allowed */ + if (req->flags & FILE_SKIP_SET_EVENT_ON_HANDLE) + set_fd_signaled( fd, 0 ); + /* removing flags is not allowed */ fd->comp_flags |= req->flags & ( FILE_SKIP_COMPLETION_PORT_ON_SUCCESS | FILE_SKIP_SET_EVENT_ON_HANDLE | FILE_SKIP_SET_USER_EVENT_ON_FAST_IO );