Sending input data to child process in node.js
问题 I am writing code to create an online c++ compiler in node.js environment.Using spawn function i created a child process which will compile the code and execute it and send the output back to the user. But i need to send input to the running c++ program . I used child.stdin.write('data'); for sending data to child but i think cin in the program is not receiving the input . Please help me to send the input to the running c++ code. Thanks. 回答1: You should probably use either cluster, or fork if