-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
electron/electron
#9132Closed
Copy link
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.
Description
- Version: 7.7.3
- Platform: Darwin 16.4.0 Darwin Kernel Version 16.4.0: Thu Dec 22 22:53:21 PST 2016; root:xnu-3789.41.3~3/RELEASE_X86_64 x86_64
- Subsystem:
child_process
Messages sent to a process forked using --eval are not received by the child process.
var ChildProcess = require('child_process')
var source = "process.on('message', function (msg) { process.send(msg) })"
var forked = ChildProcess.fork('--eval', [source])
forked.on('message', function (msg) {
console.log('message received:', msg)
})
forked.send('message')Output with Node 7.0.0:
message received: message
No output will be logged for any Node version past 7.0.0, including latest 7.7.3.
Calling forked.send after a delay of ~50ms does cause the message to be received in the forked process on 7.7.3.
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.