develooper Front page | perl.perl5.porters | Postings from August 2012

Native API/POSIX fork on Win32 Perl?

Thread Next
bulk 88
August 12, 2012 11:33
Native API/POSIX fork on Win32 Perl?
Message ID:

I am not planning to try this right now, but I want an opinion on the idea. Has anyone ever thought of Win32 Perl doing native POSIX fork ( ) on Windows NT using NT/Native API? DOS Windows hasn't been supported for a few years now, and the Perl WinCE/Mobile platform doesn't seem to have much interest anymore (does it still compile?).  That code "Zw/NtCreateProcess", is the way Interix/SFU (MS's official POSIX layer for Windows NT) does it under the hood, but it doesn't register POSIX processes with Win32 emulation layer. Not registering the process with Win32 layer is a big problem, since Win32 Perl uses Kernel32/Win32 API, the code in the book does register with Win32 emulation layer. Cygwin does not do the NtCreateProcess fork BTW. The ithreads OS virtualization layer has its own problems, but a native NT POSIX fork has 2 problems

1. using non-public Native API (which is also a driver's OS Kernel API, so it is stable)

2. relying on non-public and subject to wild changes by MS (since it is not used by kernel drivers) on every major OS version; CSRSS/Win32 emulation layer API. Heck in that example they used a hard coded non-exported function pointer (ntdll and kernel32 in each process on each Windows version always are mapped to the same address in all processes, they can not be relocated in address space).

 Is this simply too unstable from MS's OS revisions every new Windows version to use?

Do we have to support fork on WinCE/non-NT Win32 (presumably through ithread os virtualization)?

Is the ithreads OS virtualization layer much more stable than this Native API fork?

Is using undocumented OS APIs on any OS (posix, win32, vms, mac os 8, etc) forbidden in the Perl interp?

Would using Native API or the CSRSS hack ban Perl from MS's future "Secure/Signed/App Market/DRMed code" initiatives? ActiveState I presume will want to sell a App Market Secure Perl for Windows 8/9/Windows on ARM.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About