Skip to content

Instantly share code, notes, and snippets.

@pofider
Last active August 4, 2016 08:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pofider/8e4eca8e0f5093a09c5ee0b99f7dba33 to your computer and use it in GitHub Desktop.
Save pofider/8e4eca8e0f5093a09c5ee0b99f7dba33 to your computer and use it in GitHub Desktop.
node js and electron IPC doesn't work on linux
process.send('I am ok')
process.exit(0);
var electron = require('electron-prebuilt')
var spawn = require('child_process').spawn
var child = spawn(electron, ['electron-script.js'], {
stdio: ['ipc']
})
child.on('message', function (m) {
console.log('Yes it works!')
})
@pofider
Copy link
Author

pofider commented Aug 4, 2016

On windows I get back message Yes it works. On Ubuntu it prints nothing. I've tried various timeouts and various electron environment variables. Still no luck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment