DuplicateHandle() question

Conrad Scott Conrad.Scott@dsl.pipex.com
Wed Jun 12 05:45:00 GMT 2002

[I hope this is sufficiently on-topic for this list.]

I'm looking at the cygserver shm implementation and I've got a Win32 issue
that I wondered if anyone out there might be able to help me with.

The problem is that the server uses DuplicateHandle() to create a handle in
the client process. Then if the server later decides to abort the operation,
how can it close that child handle? Or can't it? If it can't, the server
will have to arrange for the client to close it for itself, which makes the
error handling all the more complex (i.e. send back the offending handle
along with the error response).

Any thoughts? or am I misunderstanding some deep fact about Win32 handles?

// Conrad

More information about the Cygwin-developers mailing list