More CreateProcess() fun.
[nssm.git] / ChangeLog.txt
1 Changes since 2.9
2 -----------------
3   * Fixed edge case with CreateProcess().
4
5     Correctly handle the case where the application executable is under
6     a path which contains space and an executable sharing the initial
7     part of that path (up to a space) exists.
8
9 Changes since 2.8
10 -----------------
11   * Fixed failure to run on Windows versions prior to Vista.
12
13 Changes since 2.7
14 -----------------
15   * Read Application, AppDirectory and AppParameters before each restart so
16     a change to any one doesn't require restarting NSSM itself.
17
18   * Fixed messages not being sent to the event log correctly in some
19     cases.
20
21   * Try to handle (strictly incorrect) quotes in AppDirectory.
22
23     Windows directories aren't allowed to contain quotes so CreateProcess()
24     will fail if the AppDirectory is quoted.  Note that it succeeds even if
25     Application itself is quoted as the application plus parameters are
26     interpreted as a command line.
27
28   * Fixed failed to write full arguments to AppParameters when
29     installing a service.
30
31   * Throttle restarts.
32
33     Back off from restarting the application immediately if it starts
34     successfully but exits too soon.  The default value of "too soon" is
35     1500 milliseconds.  This can be configured by adding a DWORD value
36     AppThrottle to the registry.
37     
38     Handle resume messages from the service console to restart the
39     application immediately even if it is throttled.
40
41   * Try to kill the process tree gracefully.
42
43     Before calling TerminateProcess() on all processes assocatiated with
44     the monitored application, enumerate all windows and threads and
45     post appropriate messages to them.  If the application bothers to
46     listen for such messages it has a chance to shut itself down gracefully.
47
48 Changes since 2.6
49 -----------------
50   * Handle missing registry values.
51
52     Warn if AppParameters is missing.  Warn if AppDirectory is missing or
53     unset and choose a fallback directory.
54     First try to find the parent directory of the application.  If that
55     fails, eg because the application path is just "notepad" or something,
56     start in the Windows directory.
57
58   * Kill process tree when stopping service.
59
60     Ensure that all child processes of the monitored application are
61     killed when the service stops by recursing through all running
62     processes and terminating those whose parent is the application
63     or one of its descendents.
64
65 Changes since 2.5
66 -----------------
67   * Removed incorrect ExpandEnvironmentStrings() error.
68
69     A log_event() call was inadvertently left in the code causing an error
70     to be set to the eventlog saying that ExpandEnvironmentStrings() had
71     failed when it had actually succeeded.
72
73 Changes since 2.4
74 -----------------
75   * Allow use of REG_EXPAND_SZ values in the registry.
76
77   * Don't suicide on exit status 0 by default.
78
79     Suiciding when the application exits 0 will cause recovery actions to be
80     taken.  Usually this is inappropriate.  Only suicide if there is an
81     explicit AppExit value for 0 in the registry.
82     
83     Technically such behaviour could be abused to do something like run a
84     script after successful completion of a service but in most cases a
85     suicide is undesirable when no actual failure occurred.
86
87   * Don't hang if startup parameters couldn't be determined.
88     Instead, signal that the service entered the STOPPED state.
89     Set START_PENDING state prior to actual startup.
90
91 Changes since 2.3
92 -----------------
93   * Ensure systems recovery actions can happen.
94
95     In Windows versions earlier than Vista the service manager would only
96     consider a service failed (and hence eligible for recovery action) if
97     the service exited without setting its state to SERVICE_STOPPED, even if
98     it signalled an error exit code.
99     In Vista and later the service manager can be configured to treat a
100     graceful shutdown with error code as a failure but this is not the
101     default behaviour.
102
103     Try to configure the service manager to use the new behaviour when
104     starting the service so users who set AppExit to Exit can use recovery
105     actions as expected.
106
107     Also recognise the new AppExit option Suicide for use on pre-Vista
108     systems.  When AppExit is Suicide don't stop the service but exit
109     inelegantly, which should be seen as a failure.
110
111 Changes since 2.2
112 -----------------
113   * Send properly formatted messages to the event log.
114
115   * Fixed truncation of very long path lengths in the registry.
116
117 Changes since 2.1
118 -----------------
119  *  Decide how to handle application exit.
120
121     When the service exits with exit code n look in
122     HKLM\SYSTEM\CurrentControlSet\Services\<service>\Parameters\AppExit\<n>,
123     falling back to the unnamed value if no such code is listed.  Parse the
124     (string) value of this entry as follows:
125
126         Restart: Start the application again (NSSM default).
127         Ignore:  Do nothing (srvany default).
128         Exit:    Stop the service.
129
130 Changes since 2.0
131 -----------------
132   * Added support for building a 64-bit executable. 
133
134   * Added project files for newer versions of Visual Studio.