Proper way to close all files after subprocess Popen and communicate

前端 未结 2 1242
被撕碎了的回忆
被撕碎了的回忆 2021-01-06 02:53

We are having some problems with the dreaded \"too many open files\" on our Ubuntu Linux machine rrunning a python Twisted application. In many places in our program, we are

2条回答
  •  日久生厌
    2021-01-06 02:59

    If you're using Twisted, don't use subprocess. If you were using spawnProcess instead, you wouldn't need to deal with annoying resource-management problems like this.

提交回复
热议问题