News for hackers. Stuff that matters.
Re:Node v0.5.0 just released by 8___D on Wednesday July 06, 2011 @06:06AM (#2733208)
I got too excited about child_process.fork before I read the description. I was imagining it would be like C where I can fork, setup the env and exec. That would probably be tricky and very ugly to implement, though..
Re:Node v0.5.0 just released by felixge on Wednesday July 06, 2011 @09:15AM (#2733717)
I have a binding for *nix fork() here:

https://github.com/felixge/node-nix

However, you need to know what you are doing, otherwise you'll have multiple processes draining the same file descriptors which will give you some nice surprises : )

Re:Node v0.5.0 just released by iter8n on Wednesday July 06, 2011 @09:34AM (#2733780)
Wow, awesome. It shouldn't be hard to create a binding for execvp as well then. I found the pipe() binding, but I can't use those fd's with child_process.spawn if i want to open them as fd 3, 4, 5, etc in the child.
Re:Node v0.5.0 just released by whatwhatwhat on Wednesday July 06, 2011 @06:58AM (#2733327)
I don't think it would be too many lines of code, tbh http://nodejs.org/docs/v0.5.0/api/all.html#child_process.exe...
Re:Node v0.5.0 just released by iter8n on Wednesday July 06, 2011 @09:10AM (#2733693)
child_process.exec is different from n*x system exec. Node is still doing the fork()ing and exec()ing behind the scenes. Exposing those calls in node would give you direct access to the child process before executing your commands.