git://git.iain.cx/iain
/
nssm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ba652d
)
Don't fail to restart if the service is stopped.
author
Iain Patterson
<me@iain.cx>
Sun, 19 Jan 2014 17:27:28 +0000
(17:27 +0000)
committer
Iain Patterson
<me@iain.cx>
Sun, 19 Jan 2014 17:27:28 +0000
(17:27 +0000)
Treat a restart control on a stopped service as a start control.
service.cpp
patch
|
blob
|
history
diff --git
a/service.cpp
b/service.cpp
index
53ee349
..
9cdf9de
100644
(file)
--- a/
service.cpp
+++ b/
service.cpp
@@
-1214,6
+1214,9
@@
int control_service(unsigned long control, int argc, TCHAR **argv) {
else {
\r
CloseHandle(service_handle);
\r
_ftprintf(stderr, _T("%s: %s: %s"), canonical_name, service_control_text(control), error_string(error));
\r
+ if (error == ERROR_SERVICE_NOT_ACTIVE) {
\r
+ if (control == SERVICE_CONTROL_SHUTDOWN || control == SERVICE_CONTROL_STOP) return 0;
\r
+ }
\r
return 1;
\r
}
\r
}
\r