From: Iain Patterson Date: Tue, 24 Feb 2015 13:37:17 +0000 (+0000) Subject: Save the environment. X-Git-Url: http://git.iain.cx/?a=commitdiff_plain;h=f124b07b52a569dd9e332d0940af592d0e8e201d;hp=f124b07b52a569dd9e332d0940af592d0e8e201d;p=nssm.git Save the environment. 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. ---