From: Pat Eyler Date: 2002-03-20T01:43:56+09:00 Subject: Re: Development of Windows version of Ruby On Wed, 20 Mar 2002, Chris Gehlker wrote: > On 3/19/02 9:05 AM, "Morris, Chris" wrote: > > > Can I try to steer the thread here? > > > > The original post was that popen and fork don't work on Windows as of > > 1.6.6-0. > > > > I tried popen on my Win95 box last night with 1.6.6-0 and it worked ... at > > least for the Dir command. Does this mean it works for everything? (I'd > > imagine so, but you know how computers are). > > > > fork is not implemented. > > > > Now, I've read other statements saying we're now missing 'all this cygwin > > functionality' -- but I'm not experienced enough to know what that is. The > > only solid things I've read is popen and fork. popen works, so then are we > > simply left with fork? > > > > It seems to me we need to be discussing: > > > > (a) what Ruby should do with fork on Windows. > > (b) what the other cygwin stuff we're missing is > > (c) what Ruby should do with (b) on Windows if there's anything there. > > > > Chris > > > > Windows is pretty much a mystery to me but I seem to remember a function > called CreateProcess() that was at least roughly equivalent to fork(). Would > that work? IT's similar, except that a) it does what fork and exec do, and b) the two processes are peers without the close relationship that parent/child processes share. I know that in the perl world, they (for various definitions of they -- I think it might have been activestate) wrote their own forkish thing to provide the functionality they wanted or used cygwin. -pate > > This is all from fading memory of job a had porting code *from* Windows. > There was a neat little program that defined all the Windows system calls. I > substituted fork() for CreateProcess(), IIRC, and it worked. > > OT but kind of interesting recollection. The code I was porting was written > in VC++. As a first step, I ported it to CodeWarrior for Windows by cleaning > up the non-ANSI stuff. This version turned out to be so much quicker and > more stable on Windows that the company I was contracting with released it. >