Comment 34 for bug 1662531

Revision history for this message
Patrick Storz (ede123) wrote :

> 4. wrt the question: 'what environment is inherited by inkscape processes spawned via Popen() on Windows'. To the best of my knowledge the answer is 'null'.

That should *not* be the case!

We use "Glib::spawn_async_with_pipes()" [1] to launch python (see extension/implementation/script.cpp) and the documentations says "Like the main spawn_async_with_pipes() method, but inheriting the parent's environment."

The documentation on "Popen()" [2] says "If env is not None, it must be a mapping that defines the environment variables for the new process; these are used instead of inheriting the current process’ environment, which is the default behavior."

So if "env" is not set in the call to Popen() the environment of the parent Inkscape process should propagate all the way through.

[1] https://developer.gnome.org/glibmm/stable/group__Spawn.html#ga6d494f70dd5b914102c89083f7996486
[2] https://docs.python.org/2.7/library/subprocess.html#popen-constructor