Friday 11 May 2018

Piped buffer disappears when program terminates; is this a known bug?

I have described the issue in the following Stack Overflow question, https://ift.tt/2G8ayGv short, if you execute:node --eval "let index = 0; let output = ''; while (index < 1000000) { output += ' ' + (index++); } console.log(output); throw new Error('test');" | cat The program's last output is 12773 when the expected output is 999999.Execute it without pipe and you will get the full output.Where does the buffer disappear?

Submitted May 11, 2018 at 07:28PM by gajus0

No comments:

Post a Comment