Created
December 18, 2010 17:56
-
-
Save michaelficarra/746710 to your computer and use it in GitHub Desktop.
forkNode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
forkNode = -> | |
args = process.argv[1..] | |
nodeArgs = [] | |
while (idx = args.indexOf '--nodejs') > -1 | |
nodeArgs = nodeArgs.concat args.splice(idx,2)[1].split(/\s+/) | |
spawn process.execPath, nodeArgs.concat(args), | |
cwd: process.cwd() | |
env: process.env | |
customFds: [0, 1, 2] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment