diff --git a/dlls/ntdll/file.c b/dlls/ntdll/file.c index b39e9314524..932dc7e4c10 100644 --- a/dlls/ntdll/file.c +++ b/dlls/ntdll/file.c @@ -1693,16 +1693,6 @@ NTSTATUS WINAPI NtFsControlFile(HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc if (!status) status = DIR_unmount_device( handle ); return status; - case FSCTL_PIPE_DISCONNECT: - status = server_ioctl_file( handle, event, apc, apc_context, io, code, - in_buffer, in_size, out_buffer, out_size ); - if (!status) - { - int fd = server_remove_fd_from_cache( handle ); - if (fd != -1) close( fd ); - } - return status; - case FSCTL_PIPE_IMPERSONATE: FIXME("FSCTL_PIPE_IMPERSONATE: impersonating self\n"); status = RtlImpersonateSelf( SecurityImpersonation ); diff --git a/server/named_pipe.c b/server/named_pipe.c index 66e3607114b..768567ffcd1 100644 --- a/server/named_pipe.c +++ b/server/named_pipe.c @@ -1126,6 +1126,7 @@ static struct pipe_server *create_pipe_server( struct named_pipe *pipe, unsigned release_object( server ); return NULL; } + allow_fd_caching( server->pipe_end.fd ); set_fd_signaled( server->pipe_end.fd, 1 ); set_server_state( server, ps_idle_server ); return server; @@ -1218,7 +1219,6 @@ static struct object *named_pipe_open_file( struct object *obj, unsigned int acc if ((client = create_pipe_client( options, pipe->flags, pipe->outsize, options ))) { - allow_fd_caching( server->pipe_end.fd ); if (server->state == ps_wait_open) fd_async_wake_up( server->pipe_end.fd, ASYNC_TYPE_WAIT, STATUS_SUCCESS ); server->pipe_end.state = FILE_PIPE_CONNECTED_STATE;