Mail Archives: cygwin-developers/1998/04/03/15:30:40
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------ =_NextPart_000_01BD5F23.9038FD70
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Actually the fork code is implemented in the brain-dead POSIX
subsystem of Windows NT. It is not built into the kernel. The POSIX
subsystem is inaccessible from cygwin32, which runs in the Win32
subsystem.
The APIs for implementing or replacing a subsystem are not documented.
Also there are some virtual memory functions at the kernel level
which are also undocumented.
There is a replacement for the MS POSIX subsystem. I think it is
called OpenNT. If you have run it, you may have noticed that its
fork() is comparable to a modern UNIX fork. They were able to do this
because they have licensed, at *great* expense the source code for
Windows NT. As you may have guessed from all of the "hints" about
copy-on-write (COW) on NTInternals, in various MS publications and on
the MSDN CDs, it was used to implement their fork.
I was trying figuring out how to allocate a brand new user-level
process. One whose virtual memory table I could then setup for
myself. From the time I spent looking into COW, I believe that OpenNT
may have used some of the undocumented kernel level process functions
in their fork. FYI, OpenNT did not work on NT 5.0 when I tried it.
Check out PAGE_WRITECOPY on MSDN or in the MS KnowledgeBase.
PAGE_WRITECOPY is available on both platforms for the VirtualXXX
functions and the file mapping functions.
If we have to resort to undocumented NT features or NT only features,
we still need the best fallback possible for the Win9X world.
------ =_NextPart_000_01BD5F23.9038FD70
Content-Type: application/ms-tnef
Content-Transfer-Encoding: base64
eJ8+IicXAQaQCAAEAAAAAAABAAEAAQeQBgAIAAAA5AQAAAAAAADoAAEIgAcAGAAAAElQTS5NaWNy
b3NvZnQgTWFpbC5Ob3RlADEIAQmAAQAhAAAAREQ0QTI4MzI0NUNCRDExMThBQTgwMDYwMDhDNzcx
MjkA/gYBIIADAA4AAADOBwQAAwARAAsAJQAFACIBAQWAAwAOAAAAzgcEAAMAEQAMAAIABQAAAQEN
gAQAAgAAAAIAAgABBIABABQAAABSRTogQ3JhenkgZm9yayBpZGVhAH8GAQOQBgAsCQAAKwAAAAsA
AgABAAAACwArAAAAAAADAC4AAAAAAEAA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