Re: g_spawn_* and Win32



Do you recall any reason for why that code does not use CreateProcess
and friends?

One reason is that if you use CreateProcess(), then you have to use
information that isn't publicly available with no strings attached to
find out how to make the C file descriptor to file HANDLE mapping be
inherited by the child process. This is readily visible if you look in
the C library sources (which come for instance with the Windows SDK,
or Microsoft's compilers), but I am not a lawyer and can't say whether
the licenses of the Windows SDK and/or Microsoft compilers allow you
to use things you learn from looking at the sources, or whether it is
considered a "trade secret" or whatever... But maybe this is being too
careful... to handle the inheritance of C file descriptors is quite
trivial, it only takes a couple of lines of code.

--tml



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]