diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-10-19 13:42:28 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-19 13:42:28 -0400 |
commit | 35746a9ee75608e7b2393e4519adca602bf2615f (patch) | |
tree | 3ed466046fe6cb7a0a6858c2b47765e2be459f3c /src/or/routerlist.c | |
parent | 09562421589c055a6cb49c802a248f727390d158 (diff) | |
download | tor-35746a9ee75608e7b2393e4519adca602bf2615f.tar.gz tor-35746a9ee75608e7b2393e4519adca602bf2615f.zip |
Comment-only change: annotate exit() calls.
Sometimes when we call exit(), it's because the process is
completely hopeless: openssl has a broken AES-CTR implementation, or
the clock is in the 1960s, or something like that.
But sometimes, we should return cleanly from tor_main() instead, so
that embedders can keep embedding us and start another Tor process.
I've gone through all the exit() and _exit() calls to annotate them
with "exit ok" or "XXXX bad exit" -- the next step will be to fix
the bad exit()s.
First step towards 23848.
Diffstat (limited to 'src/or/routerlist.c')
-rw-r--r-- | src/or/routerlist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 1fa27f722c..b59f318fc8 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3082,7 +3082,7 @@ signed_descriptor_get_body_impl(const signed_descriptor_t *desc, log_err(LD_DIR, "We couldn't read a descriptor that is supposedly " "mmaped in our cache. Is another process running in our data " "directory? Exiting."); - exit(1); + exit(1); // XXXX bad exit: should recover. } } if (!r) /* no mmap, or not in cache. */ @@ -3096,7 +3096,7 @@ signed_descriptor_get_body_impl(const signed_descriptor_t *desc, log_err(LD_DIR, "descriptor at %p begins with unexpected string %s. " "Is another process running in our data directory? Exiting.", desc, escaped(cp)); - exit(1); + exit(1); // XXXX bad exit: should recover. } } |