On Mon, 2010-02-22 at 02:03 +0100, Henrik Nordström wrote: > mån 2010-02-22 klockan 11:44 +1100 skrev Robert Collins: > > > command protocol for it would be pretty similar to the SHM disk IO > > helper, but for processes. Something like: > > squid->helper: spawn stderrfd argv(escaped/encoded to be line & NULLZ > > string safe) > > helper->squid: pid, stdinfd, stdoutfd > > Which requires UNIX domain sockets for fd passing, and unknown > implementation on Windows..
I thought SHM could pass around fd's. Anyhow, its doable on unix. On windows you can supply a HANDLE cross process: BOOL WINAPI DuplicateHandle( __in HANDLE hSourceProcessHandle, __in HANDLE hSourceHandle, __in HANDLE hTargetProcessHandle, __out LPHANDLE lpTargetHandle, __in DWORD dwDesiredAccess, __in BOOL bInheritHandle, __in DWORD dwOptions ) So you call that, and then the other process can use the handle. -Rob
signature.asc
Description: This is a digitally signed message part
