Node.js catch ENOMEM error thrown after spawn

前端 未结 6 1723
孤独总比滥情好
孤独总比滥情好 2020-12-02 06:33

My Node.js script crashes because of a thrown ENOMEM (Out of memory) errnoException when using spawn.

The error:

child_process.js:935
  throw errnoEx         


        
6条回答
  •  粉色の甜心
    2020-12-02 07:23

    You have to flush the outputs from the called process!

    A python example looks like this:

    import sys
    ...
    sys.stdout.flush()
    

提交回复
热议问题