Last active
August 4, 2016 08:05
-
-
Save pofider/8e4eca8e0f5093a09c5ee0b99f7dba33 to your computer and use it in GitHub Desktop.
node js and electron IPC doesn't work on linux
This file contains 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
process.send('I am ok') | |
process.exit(0); |
This file contains 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
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!') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.