delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/01/30/03:50:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <006e01c1a96a$f60429a0$aace0544@CX535256D>
From: "Barubary" <barubary AT cox DOT net>
To: <cygwin AT cygwin DOT com>
Subject: A real fork() on NT
Date: Wed, 30 Jan 2002 00:48:59 -0800
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000

When looking at XP's CreateProcessW (or rather, CreateProcessInternalW) I
noticed something strange about the way it creates a process.  It seems that
NT is sort of capable of a fork() command.  The function NtCreateProcess
appears to create a "blank" process, into which you can put anything you
want.  After NtCreateProcess, kernel32 maps the EXE into that new process's
memory space, creates a thread, and finally calls NtResumeThread to start
its execution.

If this long, nasty, scattered function could be reverse engineered, it
should be possible to create a true fork() for NT, instead of doing the
normal cygwin "hack" method.

-- Barubary


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019