From: Paul Brannan Date: 2002-11-06T07:00:15+09:00 Subject: Re: Win32 support issues On Wed, Nov 06, 2002 at 06:43:34AM +0900, Lyle Johnson wrote: > Rich Kilmer wrote: > > > I don't think its 'fork' the command, but fork-like behavior. Its weird > > that on win32 you can use win32ole to start and drive any COM/OLE > > component (word, IE, excel) but you cannot start another command-line > > executable and drive its behavior (through stdin/out/err). This would > > be enabled by open3/popen3 (which under unix is implemented via fork). > > My understanding was that the main difference between fork() and the > Win32 function CreateProcess() is that fork() makes a copy of the entire > process image, whereas CreateProcess() does not. Are there some other > significant differences that you're seeing? I don't think it's fork() that is needed (since almost anything that can be done with fork() can be done with Threads), but fork/exec. That's what CreateProcess does (and a bit more). The fact that fork makes a copy of the process image isn't really important, since the process image gets overwritten when exec() is called. What's more important is the fact that file descriptors get duplicated in the child process; there's sure to be someone out there who relies on that behavior. Paul