aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-09-08 21:54:12 -0400
committerNick Mathewson <nickm@torproject.org>2011-09-08 21:54:12 -0400
commit45eadf39551bc1d3d00e677c8b7fd977a17aad01 (patch)
treef5308e52c175a1328f9615fa98c2df027df2d7d0 /src
parentdfa6cde4d4de57476ea8381199dfbac1afc245d5 (diff)
downloadtor-45eadf39551bc1d3d00e677c8b7fd977a17aad01.tar
tor-45eadf39551bc1d3d00e677c8b7fd977a17aad01.tar.gz
All NT service configuration commands should make the process exit.
Fixes bug 3963; fix on 0.2.0.7-alpha.
Diffstat (limited to 'src')
-rw-r--r--src/or/ntmain.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/ntmain.c b/src/or/ntmain.c
index b2fee648c..985fab73c 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) {