Windows command analaguous to fork

This is a discussion on Windows command analaguous to fork within the Windows Programming forums, part of the Platform Specific Boards category; Simple question : Is there a windows command that has the same functionality as the fork() system call in Linux ...

  1. #1
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625

    Windows command analaguous to fork

    Simple question : Is there a windows command that has the same functionality as the fork() system call in Linux ? I only know of the CreateProcess command, but I don't think it's quite the same. Anyone know how you'd emulate a fork() in windows ?
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    What MSDN says

    One of the largest areas of difference is in the process model. UNIX has fork; Win32 does not. Depending on the use of fork and the code base, Win32 has two APIs that can be used: CreateProcess and CreateThread. A UNIX application that forks multiple copies of itself can be reworked in Win32 to have either multiple processes or a single process with multiple threads. If multiple processes are used, there are multiple methods of IPC that can be used to communicate between the processes (and perhaps to update the code and data of the new process to be like the parent, if the functionality that fork provides is needed). For more on IPC, see Interprocess Commuications.
    Supposedly it can be simulated with the native API function ZwCreateProcess, and is described in a book documenting the native API, but it's very tedious.

  3. #3
    Fear the Reaper...
    Join Date
    Aug 2005
    Location
    Toronto, Ontario, Canada
    Posts
    625
    Ok, thanks a lot
    Teacher: "You connect with Internet Explorer, but what is your browser? You know, Yahoo, Webcrawler...?" It's great to see the educational system moving in the right direction

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. fork in windows os
    By cnu_sree in forum C Programming
    Replies: 3
    Last Post: 01-12-2008, 05:02 AM
  2. fork() in Windows?
    By jamesstanley in forum Windows Programming
    Replies: 6
    Last Post: 09-14-2007, 12:04 PM
  3. how to make a windows application
    By crvenkapa in forum C++ Programming
    Replies: 3
    Last Post: 03-26-2007, 10:59 AM
  4. SDL and Windows
    By nickname_changed in forum Windows Programming
    Replies: 14
    Last Post: 10-24-2003, 01:19 AM
  5. IE 6 status bar
    By DavidP in forum Tech Board
    Replies: 15
    Last Post: 10-23-2002, 06:31 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21