Refactor kill functions to be independent of services.
[nssm.git] / ChangeLog.txt
1 Changes since 2.24\r
2 ------------------\r
3   * Allow skipping kill_process_tree().\r
4 \r
5   * NSSM can now sleep a configurable amount of time after\r
6     rotating output files.\r
7 \r
8   * NSSM can now rotate log files by calling CopyFile()\r
9     followed by SetEndOfFile(), allowing it to rotate files\r
10     which other processes hold open.\r
11 \r
12 Changes since 2.23\r
13 ------------------\r
14   * NSSM once again calls TerminateProcess() correctly.\r
15 \r
16 Changes since 2.22\r
17 ------------------\r
18   * NSSM no longer clutters the event log with "The specified\r
19     procedure could not be found" on legacy Windows releases.\r
20 \r
21   * Fixed failure to set a local username to run the service.\r
22 \r
23 Changes since 2.21\r
24 ------------------\r
25   * Existing services can now be managed using the GUI\r
26     or on the command line.\r
27 \r
28   * NSSM can now set the priority class and processor\r
29     affinity of the managed application.\r
30 \r
31   * NSSM can now apply an unconditional delay before\r
32     restarting the application.\r
33 \r
34   * NSSM can now optionally rotate existing files when\r
35     redirecting I/O.\r
36 \r
37   * Unqualified path names are now relative to the\r
38     application startup directory when redirecting I/O.\r
39 \r
40   * NSSM can now set the service display name, description,\r
41     startup type and log on details.\r
42 \r
43   * All services now receive a standard console window,\r
44     allowing them to read input correctly (if running in\r
45     interactive mode).\r
46 \r
47 Changes since 2.20\r
48 ------------------\r
49   * Services installed from the GUI no longer have incorrect\r
50     AppParameters set in the registry.\r
51 \r
52 Changes since 2.19\r
53 ------------------\r
54   * Services installed from the commandline without using the\r
55     GUI no longer have incorrect AppStopMethod* registry\r
56     entries set.\r
57 \r
58 Changes since 2.18\r
59 ------------------\r
60   * Support AppEnvironmentExtra to append to the environment\r
61     instead of replacing it.\r
62 \r
63   * The GUI is significantly less sucky.\r
64 \r
65 Changes since 2.17\r
66 ------------------\r
67   * Timeouts for each shutdown method can be configured in\r
68     the registry.\r
69 \r
70   * The GUI is slightly less sucky.\r
71 \r
72 Changes since 2.16\r
73 ------------------\r
74   * NSSM can now redirect the service's I/O streams to any path\r
75     capable of being opened by CreateFile().\r
76 \r
77   * Allow building on Visual Studio Express.\r
78 \r
79   * Silently ignore INTERROGATE control.\r
80 \r
81   * Try to send Control-C events to console applications when\r
82     shutting them down.\r
83 \r
84 Changes since 2.15\r
85 ------------------\r
86   * Fixed case where NSSM could kill unrelated processes when\r
87     shutting down.\r
88 \r
89 Changes since 2.14\r
90 ------------------\r
91   * NSSM is now translated into Italian.\r
92 \r
93   * Fixed GUI not allowing paths longer than 256 characters.\r
94 \r
95 Changes since 2.13\r
96 ------------------\r
97   * Fixed default GUI language being French not English.\r
98 \r
99 Changes since 2.12\r
100 ------------------\r
101   * Fixed failure to run on Windows 2000.\r
102 \r
103 Changes since 2.11\r
104 ------------------\r
105   * NSSM is now translated into French.\r
106 \r
107   * Really ensure systems recovery actions can happen.\r
108 \r
109     The change supposedly introduced in v2.4 to allow service recovery\r
110     actions to be activated when the application exits gracefully with\r
111     a non-zero error code didn't actually work.\r
112 \r
113 Changes since 2.10\r
114 ------------------\r
115   * Support AppEnvironment for compatibility with srvany.\r
116 \r
117 Changes since 2.9\r
118 -----------------\r
119   * Fixed failure to compile messages.mc in paths containing spaces.\r
120 \r
121   * Fixed edge case with CreateProcess().\r
122 \r
123     Correctly handle the case where the application executable is under\r
124     a path which contains space and an executable sharing the initial\r
125     part of that path (up to a space) exists.\r
126 \r
127 Changes since 2.8\r
128 -----------------\r
129   * Fixed failure to run on Windows versions prior to Vista.\r
130 \r
131 Changes since 2.7\r
132 -----------------\r
133   * Read Application, AppDirectory and AppParameters before each restart so\r
134     a change to any one doesn't require restarting NSSM itself.\r
135 \r
136   * Fixed messages not being sent to the event log correctly in some\r
137     cases.\r
138 \r
139   * Try to handle (strictly incorrect) quotes in AppDirectory.\r
140 \r
141     Windows directories aren't allowed to contain quotes so CreateProcess()\r
142     will fail if the AppDirectory is quoted.  Note that it succeeds even if\r
143     Application itself is quoted as the application plus parameters are\r
144     interpreted as a command line.\r
145 \r
146   * Fixed failed to write full arguments to AppParameters when\r
147     installing a service.\r
148 \r
149   * Throttle restarts.\r
150 \r
151     Back off from restarting the application immediately if it starts\r
152     successfully but exits too soon.  The default value of "too soon" is\r
153     1500 milliseconds.  This can be configured by adding a DWORD value\r
154     AppThrottle to the registry.\r
155     \r
156     Handle resume messages from the service console to restart the\r
157     application immediately even if it is throttled.\r
158 \r
159   * Try to kill the process tree gracefully.\r
160 \r
161     Before calling TerminateProcess() on all processes assocatiated with\r
162     the monitored application, enumerate all windows and threads and\r
163     post appropriate messages to them.  If the application bothers to\r
164     listen for such messages it has a chance to shut itself down gracefully.\r
165 \r
166 Changes since 2.6\r
167 -----------------\r
168   * Handle missing registry values.\r
169 \r
170     Warn if AppParameters is missing.  Warn if AppDirectory is missing or\r
171     unset and choose a fallback directory.\r
172     First try to find the parent directory of the application.  If that\r
173     fails, eg because the application path is just "notepad" or something,\r
174     start in the Windows directory.\r
175 \r
176   * Kill process tree when stopping service.\r
177 \r
178     Ensure that all child processes of the monitored application are\r
179     killed when the service stops by recursing through all running\r
180     processes and terminating those whose parent is the application\r
181     or one of its descendents.\r
182 \r
183 Changes since 2.5\r
184 -----------------\r
185   * Removed incorrect ExpandEnvironmentStrings() error.\r
186 \r
187     A log_event() call was inadvertently left in the code causing an error\r
188     to be set to the eventlog saying that ExpandEnvironmentStrings() had\r
189     failed when it had actually succeeded.\r
190 \r
191 Changes since 2.4\r
192 -----------------\r
193   * Allow use of REG_EXPAND_SZ values in the registry.\r
194 \r
195   * Don't suicide on exit status 0 by default.\r
196 \r
197     Suiciding when the application exits 0 will cause recovery actions to be\r
198     taken.  Usually this is inappropriate.  Only suicide if there is an\r
199     explicit AppExit value for 0 in the registry.\r
200     \r
201     Technically such behaviour could be abused to do something like run a\r
202     script after successful completion of a service but in most cases a\r
203     suicide is undesirable when no actual failure occurred.\r
204 \r
205   * Don't hang if startup parameters couldn't be determined.\r
206     Instead, signal that the service entered the STOPPED state.\r
207     Set START_PENDING state prior to actual startup.\r
208 \r
209 Changes since 2.3\r
210 -----------------\r
211   * Ensure systems recovery actions can happen.\r
212 \r
213     In Windows versions earlier than Vista the service manager would only\r
214     consider a service failed (and hence eligible for recovery action) if\r
215     the service exited without setting its state to SERVICE_STOPPED, even if\r
216     it signalled an error exit code.\r
217     In Vista and later the service manager can be configured to treat a\r
218     graceful shutdown with error code as a failure but this is not the\r
219     default behaviour.\r
220 \r
221     Try to configure the service manager to use the new behaviour when\r
222     starting the service so users who set AppExit to Exit can use recovery\r
223     actions as expected.\r
224 \r
225     Also recognise the new AppExit option Suicide for use on pre-Vista\r
226     systems.  When AppExit is Suicide don't stop the service but exit\r
227     inelegantly, which should be seen as a failure.\r
228 \r
229 Changes since 2.2\r
230 -----------------\r
231   * Send properly formatted messages to the event log.\r
232 \r
233   * Fixed truncation of very long path lengths in the registry.\r
234 \r
235 Changes since 2.1\r
236 -----------------\r
237  *  Decide how to handle application exit.\r
238 \r
239     When the service exits with exit code n look in\r
240     HKLM\SYSTEM\CurrentControlSet\Services\<service>\Parameters\AppExit\<n>,\r
241     falling back to the unnamed value if no such code is listed.  Parse the\r
242     (string) value of this entry as follows:\r
243 \r
244         Restart: Start the application again (NSSM default).\r
245         Ignore:  Do nothing (srvany default).\r
246         Exit:    Stop the service.\r
247 \r
248 Changes since 2.0\r
249 -----------------\r
250   * Added support for building a 64-bit executable.\r
251 \r
252   * Added project files for newer versions of Visual Studio.\r