summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2015-09-03 11:38:00 -0400
committerNick Mathewson <nickm@torproject.org>2015-09-03 11:38:00 -0400
commite73206f68184a0d571a875044cf0a2cb6090f454 (patch)
treee3806f84c186aa65f0b2c92dc43f1e542d3e145f /src
parent91ca434451064ef00532c4f8e4b098f2b1c516d1 (diff)
downloadtor-e73206f68184a0d571a875044cf0a2cb6090f454.tar.gz
tor-e73206f68184a0d571a875044cf0a2cb6090f454.zip
Only return 0..255 from main().
I think this may fix some bugs with windows exit codes being screwy.
Diffstat (limited to 'src')
-rw-r--r--src/or/tor_main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/or/tor_main.c b/src/or/tor_main.c
index af03b8c06a..65bb020c2c 100644
--- a/src/or/tor_main.c
+++ b/src/or/tor_main.c
@@ -27,6 +27,10 @@ int tor_main(int argc, char *argv[]);
int
main(int argc, char *argv[])
{
- return tor_main(argc, argv);
+ int r = tor_main(argc, argv);
+ if (r < 0 || r > 255)
+ return 1;
+ else
+ return r;
}