Excellent! Yes, let's work slowly toward a MinGW build. There are
probably a dozen big things that need to be reimplemented.
> The first thing I'd like to try to convert is child_process.spawn().
> Its performance is pretty bad currently, presumably because cygwin
> doesn't do vfork() - it just does fork()s instead. Windows has the
> CreateProcess function that makes it possible to connect the spawned
> process' stdin/out/err to existing pipes, so we wouldn't need fork at
> all.
Good idea.
> The question is: where do I put this platform-specific stuff?
> Off course I can just use '#ifdef __CYGWIN__' which would probably
> work for spawn but may not be very maintainable in the long run. For
> example, if we want to port asynchronous io, it's gonna be a major
> problem because porting libeio is a no-go I think, so we would end up
> writing #ifdefs all the time.
Ideally we could work these into the platform files? But perhaps
windows just needs its own files. Just do a
node_child_process_windows.cc file for now.
--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.
> Why doesn't someone who knows what they're doing, write down a list of
> things that needs to be done in order to have a MinGW version of node,
> and people who are competent can work through different items if they
> can?
Because everyone who knows what they are doing is busy doing something
else. Therefore, someone who has no idea what they are doing, such as
myself, is probably going to have to create a Wiki page:
http://wiki.github.com/ry/node/windows-port-mingw
The road map was extracted from the Windows port discussions from the
mailing list found at the top of the page.
The bottom of the page has a list of suspected Windows sympathizers
based on mailing list discussions, created with the intent of fostering
a Windows hacker community. If you are mortified to find your name on
this list, please remove it. If you are crushed that your name is not on
the list, please add it.
--
Alan Gutierrez - al...@blogometer.com - http://twitter.com/bigeasy
> The trouble is, those who know what they're doing, don't use windows.
True dat, but, hey. Looks like Ryan Dahl and Elijah Insua have spoken
with Marc Lehmann, and I'm beginning to understand that...
Node.js depends on libev and libeio for Great Justice. Porting those two
libraries to Windows would port Node.js to Windows. libev already works
on Windows, with issues related to a lack of asynchronous I/O on pipes.
libeio does not work on Windows except via cygwin.
There is historic discussion about schmorp's libraries and Windows to be
found on his website.
http://www.google.com/search?q=site%3Alists.schmorp.de+windows
Does it help to read through the Cygwin code? If Node.js works on
Cygwin, is it a matter of pulling the Cygwin tricks out of Cygwin and
into eio.c? Here's Cygwin's pipe() implementation, with notes on how to
create a selectable pipe.
Or is that too optimistic on my part?