Neovim kills child processes created by subprocess.Popen

Hi,

I notice that neovim kills all child processes spawned via Pythons subprocess.Popen. As a test, if you create a file (say /tmp/foo.py) with the contents:

import subprocess

subprocess.Popen('xterm', shell=True, stdin=subprocess.DEVNULL,
                 stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)

and in Neovim, you issue the command:

pyfile /tmp/foo.py

This spawns a new xterm window (as expected). However, if you then quit neovim, the xterm window is killed as well.

If you try the same experiment in gvim, then the xterm window remains alive after you quit gvim.

Is there a way to make Neovim mimic gvim’s behavior. I want to spawn processes which I expected to outlive neovim.

Regards,
Srinath