jashkenas/coffeescript — pull request #3479 by lightblade (2014-05-15 06:11:36+00:00)
Title: Issue spawning child process in nodejs with harmony generators

I ran into a strange issue with coffee script executable. Enabling `--harmony` seems to mess up IPC with node's `child_process.fork`

```coffee

# parent.coffee

spawn = require('child_process').spawn

child = spawn('/usr/local/bin/coffee', [ '--nodejs', '--harmony-generators', './child.coffee' ], {
stdio: [0, 1, 2, 'ipc']
})

child.on('message', console.log.bind(console, 'from child'))
child.send({ hello: 'child' })
```

```coffee

# child.coffee

# comment
process.on('message', console.log.bind(console, 'from parent'))
process.send({ hello: 'parent' })

gen = `function *() {
}`

gen()
```

In the above code, if you remove `'--nodejs', '--harmony-generators'`, IPC works correctly but generators won't be enabled. Once you add the params in, IPC breaks (process.send is undefined), but generators are enabled.

#3450 May be related to this.

node@0.11.12
coffee-script@1.7.1