Added large I/O message support. (#95)

This commit is contained in:
Ravin Perera
2020-06-05 21:54:06 +05:30
committed by GitHub
parent 10374352c6
commit 3aed949032
12 changed files with 791 additions and 727 deletions

View File

@@ -13,9 +13,9 @@ fs.appendFileSync("exects.txt", "ts:" + hpargs.ts + "\n");
Object.keys(hpargs.usrfd).forEach(function (key, index) {
let userfds = hpargs.usrfd[key];
let userinput = fs.readFileSync(userfds[0], 'utf8');
if (userinput.length > 0) {
if (userfds[0] != -1) {
let userinput = fs.readFileSync(userfds[0], 'utf8');
// Append user input to a state file.
fs.appendFileSync("userinputs.txt", userinput + "\n");
fs.writeSync(userfds[1], "Echoing: " + userinput);