Refactor kill functions to be independent of services.
[nssm.git] / README.txt
index df918bd..e944340 100644 (file)
@@ -1,5 +1,5 @@
 NSSM: The Non-Sucking Service Manager\r
-Version 2.21, 2013-11-24\r
+Version 2.24, 2014-08-31\r
 \r
 NSSM is a service helper program similar to srvany and cygrunsrv.  It can \r
 start any application as an NT service and will restart the service if it \r
@@ -62,7 +62,7 @@ an application which has exited.
 Since version 2.22, NSSM can rotate existing output files when redirecting I/O.\r
 \r
 Since version 2.22, NSSM can set service display name, description, startup\r
-type and log on details.\r
+type, log on details and dependencies.\r
 \r
 Since version 2.22, NSSM can manage existing services.\r
 \r
@@ -261,6 +261,11 @@ that the timeout applies to each process in the application's process tree,
 so the actual time to shutdown may be longer than the sum of all configured\r
 timeouts if the application spawns multiple subprocesses.\r
 \r
+To skip applying the above stop methods to all processes in the application's\r
+process tree, applying them only to the original application process, set the\r
+HKLM\SYSTEM\CurrentControlSet\Services\<service>\Parameters\AppKillProcessTree\r
+registry value, which should be of type REG_DWORD, to 0.\r
+\r
 \r
 Console window\r
 --------------\r
@@ -321,6 +326,19 @@ If AppRotateBytes is non-zero, a file will not be rotated if it is smaller
 than the given number of bytes.  64-bit file sizes can be handled by setting\r
 a non-zero value of AppRotateBytesHigh.\r
 \r
+If AppRotateDelay is non-zero, NSSM will pause for the given number of\r
+milliseconds after rotation.\r
+\r
+If AppStdoutCopyAndTruncate or AppStdErrCopyAndTruncate are non-zero, the\r
+stdout (or stderr respectively) file will be rotated by first taking a copy\r
+of the file then truncating the original file to zero size.  This allows\r
+NSSM to rotate files which are held open by other processes, preventing the\r
+usual MoveFile() from succeeding.  Note that the copy process may take some\r
+time if the file is large, and will temporarily consume twice as much disk\r
+space as the original file.  Note also that applications reading the log file\r
+may not notice that the file size changed.  Using this option in conjunction\r
+with AppRotateDelay may help in that case.\r
+\r
 Rotation is independent of the CreateFile() parameters used to open the files.\r
 They will be rotated regardless of whether NSSM would otherwise have appended\r
 or replaced them.\r
@@ -494,6 +512,14 @@ managed application.  Valid priorities are as follows:
   IDLE_PRIORITY_CLASS\r
 \r
 \r
+The DependOnGroup and DependOnService parameters are used to query or set\r
+the dependencies for the service.  When setting dependencies, each service\r
+or service group (preceded with the + symbol) should be specified in\r
+separate command line arguments.  For example:\r
+\r
+    nssm set <servicename> DependOnService RpcSs LanmanWorkstation\r
+\r
+\r
 The Name parameter can only be queried, not set.  It returns the service's\r
 registry key name.  This may be useful to know if you take advantage of\r
 the fact that you can substitute the service's display name anywhere where\r
@@ -520,8 +546,8 @@ The following well-known usernames do not need a password.  The password
 parameter can be omitted when using them:\r
 \r
   "LocalSystem" aka "System" aka "NT Authority\System"\r
-  "Local Service" aka "NT Authority\Local Service"\r
-  "Network Service" aka "NT Authority\Network Service"\r
+  "LocalService" aka "Local Service" aka "NT Authority\Local Service"\r
+  "NetworkService" aka "Network Service" aka "NT Authority\Network Service"\r
 \r
 \r
 The Start parameter is used to query or set the startup type of the service.\r
@@ -652,10 +678,10 @@ advising how to build messages.mc correctly in paths containing spaces.
 Thanks to Rob Sharp for pointing out that NSSM did not respect the\r
 AppEnvironment registry value used by srvany.\r
 Thanks to Szymon Nowak for help with Windows 2000 compatibility.\r
-Thanks to François-Régis Tardy for French translation.\r
+Thanks to François-Régis Tardy and Gildas le Nadan for French translation.\r
 Thanks to Emilio Frini for spotting that French was inadvertently set as\r
 the default language when the user's display language was not translated.\r
-Thanks to Riccardo Gusmeroli for Italian translation.\r
+Thanks to Riccardo Gusmeroli and Marco Certelli for Italian translation.\r
 Thanks to Eric Cheldelin for the inspiration to generate a Control-C event\r
 on shutdown.\r
 Thanks to Brian Baxter for suggesting how to escape quotes from the command\r
@@ -671,6 +697,15 @@ Thanks to Andrew RedzMax for suggesting an unconditional restart delay.
 Thanks to Bryan Senseman for noticing that applications with redirected stdout\r
 and/or stderr which attempt to read from stdin would fail.\r
 Thanks to Czenda Czendov for help with Visual Studio 2013 and Server 2012R2.\r
+Thanks to Alessandro Gherardi for reporting and draft fix of the bug whereby\r
+the second restart of the application would have a corrupted environment.\r
+Thanks to Hadrien Kohl for suggesting to disable the console window's menu.\r
+Thanks to Allen Vailliencourt for noticing bugs with configuring the service to\r
+run under a local user account.\r
+Thanks to Sam Townsend for noticing a regression with TerminateProcess().\r
+Thanks to Barrett Lewis for suggesting the option to skip terminating the\r
+application's child processes.\r
+Thanks to Miguel Angel Terrón for suggesting copy/truncate rotation.\r
 \r
 Licence\r
 -------\r