I just killed GIL!!!

sturlamolden sturlamolden at yahoo.no
Fri Apr 18 21:29:42 EDT 2008


On 18 Apr, 21:28, "sjdevn... at yahoo.com" <sjdevn... at yahoo.com> wrote:

> Passing a NULL SectionHandle to NTCreateProcess/CreateProcessEx
> results in a fork-style copy-on-write duplicate of the current process.

I know about NtCreateProcess and ZwCreateProcess, but they just create
an empty process - no context, no thread(s), no DLLs loaded, etc.
There is even an example code of how to implement fork() with
ZwCreateProcess in Nebbet's book on NT kernel internals, but
apparently it doesn't work quite well. (Right now I cannot even make
it compile, because WDK headers are fubar with invalid C; even
Microsoft's own compiler does not accept them.)

Searching with Google, I find several claims that there is a
"CreateProcessEx", which can do a COW fork of a process in the Win32
subsystem. I cannot find it documented anywhere. It is also not
exported by kernel32.dll. If you know how this function is defined and
which DLL exports it, please post it. But I suspect it does not
exist.





More information about the Python-list mailing list