Save the environment.
authorIain Patterson <me@iain.cx>
Tue, 24 Feb 2015 13:37:17 +0000 (13:37 +0000)
committerIain Patterson <me@iain.cx>
Tue, 24 Feb 2015 13:37:17 +0000 (13:37 +0000)
Before the previous two commits we used to read the environment from the
registry and set it using an optimisation which modified the retrieved
block in-place.

Now we need to set the environment twice after querying the registry -
once in get_parameters() and once just before CreateProcess(), which
means we can't use the in-place optimisation and must copy the block
before operating on it.

Additionally, nssm_hook() cleans the environment so we have to reinstate
it immediately prior to launching the application.


No differences found