Python [child] process sending message to Node [parent] process
问题 Python process forked by NodeJS - Alternative to process.send() for Python? I followed the solution above but doesnt seem to work (no messages are being send by the child python code. Here is my code: const spawn = require('child_process').spawn; var child = spawn('python3', ['child.py'], { stdio:[null, null, null, 'pipe'] }); child.on('message', function(message) { console.log('Received message...'); console.log(message); }); and # !/usr/bin/python3 import os os.write(3, str.encode("HELLO"))