On Thu, Dec 1, 2016 at 4:34 AM, duncan smith <duncan@invalid.invalid> wrote:
>
> def _execute(command):
>     # shell=True security hazard?
>     p = subprocess.Popen(command, shell=True, stdin=subprocess.PIPE,
>                          stdout=subprocess.PIPE,
>                          stderr=subprocess.STDOUT,
>                          close_fds=True)
>     output = p.stdout.read()
>     p.stdin.close()
>     p.stdout.close()
>     #p.communicate()
>     if output:
>         print output

Do you ever wait() these processes? If not, you might be leaving a
whole lot of zombies behind, which will eventually exhaust your
process table.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to