Patch to pass file descriptors

Dmitry Timoshkov
Wed Jul 3 03:57:00 GMT 2002

Hello all.

Why not implement passing file descriptors in the following way:

Somewhere in the structure passed to sendmsg send a handle of
the calling process created with
OpenProcess(PROCESS_DUP_HANDLE, FALSE, GetCurrentProcessId());
OpenProcess will always succed, since the caller is current process.

recvmsg implementation will just use that process handle
for the DuplicateHandle call.

That approach worked for me year ago in the experimental (now dead)
Cygwin port of my application.


More information about the Cygwin-patches mailing list