On Sun, Nov 1, 2009 at 2:56 AM, OvermindDL1 <[email protected]> wrote:
> I am curious, on a Windows system, to spawn a new process you > generally use CreateProcess, which returns immediately (it just posts > a message to the kernel that the kernel handles shortly. You get back > a handle and a few other things. If you want to wait for the process > you started to quit then you can just basically > WaitForEvent(theHandle), which pauses until the other process > terminates, then using the handle you can get things like closing code > and stuff like that (or during run you can hook its cin/cout and so > forth). Admittedly I originally come from the DOS world long long > ago, but it seems rather heavyweight to me to fork an entire process > just to spawn another process, certainly there is a better way then > that? Usually a "fork" is actually a "vfork", which is lighter: http://en.wikipedia.org/wiki/Fork_%28operating_system%29#Vfork_and_page_sharing Also, Unices are designed so that 'fork', 'vfork', etc are cheap. This is not the case in Windows. In case you are going to mix 'fork' and threads, read this: http://unix.derkeiler.com/Newsgroups/comp.unix.programmer/2003-09/0672.html -- Pau Garcia i Quiles http://www.elpauer.org (Due to my workload, I may need 10 days to answer) ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ witty-interest mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/witty-interest
