[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/release-0.2.2] All NT service configuration commands should make the process exit.



commit 45eadf39551bc1d3d00e677c8b7fd977a17aad01
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date:   Thu Sep 8 21:54:12 2011 -0400

    All NT service configuration commands should make the process exit.
    
    Fixes bug 3963; fix on 0.2.0.7-alpha.
---
 changes/bug3963 |    5 +++++
 src/or/ntmain.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/changes/bug3963 b/changes/bug3963
new file mode 100644
index 0000000..2fc44a0
--- /dev/null
+++ b/changes/bug3963
@@ -0,0 +1,5 @@
+  o Minor bugfixes:
+    - When configuring, starting, or stopping an NT service, stop
+      immediately after the service configuration attempt has succeeded
+      or failed. Fixes bug3963; bugfix on 0.2.0.7-alpha.
+
diff --git a/src/or/ntmain.c b/src/or/ntmain.c
index b2fee64..985fab7 100644
--- a/src/or/ntmain.c
+++ b/src/or/ntmain.c
@@ -728,6 +728,7 @@ nt_service_parse_options(int argc, char **argv, int *should_exit)
   if ((argc >= 3) &&
       (!strcmp(argv[1], "-service") || !strcmp(argv[1], "--service"))) {
     nt_service_loadlibrary();
+    *should_exit = 1;
     if (!strcmp(argv[2], "install"))
       return nt_service_install(argc, argv);
     if (!strcmp(argv[2], "remove"))
@@ -737,7 +738,6 @@ nt_service_parse_options(int argc, char **argv, int *should_exit)
     if (!strcmp(argv[2], "stop"))
       return nt_service_cmd_stop();
     printf("Unrecognized service command '%s'\n", argv[2]);
-    *should_exit = 1;
     return 1;
   }
   if (argc >= 2) {



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits