This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: Patch to pass file descriptors
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.
--
Dmitry.