diff options
-rw-r--r-- | changes/normalize_exit | 3 | ||||
-rw-r--r-- | src/or/tor_main.c | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/changes/normalize_exit b/changes/normalize_exit new file mode 100644 index 0000000000..636d45a45a --- /dev/null +++ b/changes/normalize_exit @@ -0,0 +1,3 @@ + o Minor features: + - Try harder to normalize the exit status of the Tor process to the + standard-provided range. 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; } |