PyVirtualDisplay icon indicating copy to clipboard operation
PyVirtualDisplay copied to clipboard

Set new session on created display

Open dp-alvarez opened this issue 2 years ago • 0 comments

The way PyVirtualDisplay works now, the virtual X server is created on the same process group as the Python script.

One of the effects of this is that when sending, for example, SIGINT to the Python script the virtual X server also receives it and exits before the script can do any cleanup.

Adding start_new_session=True to the subprocess.Popen in AbstractDisplay would easily solve this and possibly other subtle edge cases, as it makes a lot of sense for the X server to be on it's own session.

dp-alvarez avatar Aug 02 '22 23:08 dp-alvarez