Ticket #22720: tic22720.patch

File tic22720.patch, 1.4 KB (added by huyvq, 2 years ago)
  • src/or/control.c

    From 9c72a085bf622e9b7b48905bb3c185bcb395df43 Mon Sep 17 00:00:00 2001
    From: Vu Quoc Huy <huyvq.c633@gmail.com>
    Date: Mon, 26 Jun 2017 13:55:13 +0700
    Subject: [PATCH] exit(1) on error, mostly indicated by log_err()
    
    ---
     src/or/control.c | 2 +-
     src/or/main.c    | 4 ++--
     2 files changed, 3 insertions(+), 3 deletions(-)
    
    diff --git a/src/or/control.c b/src/or/control.c
    index b9717250b..232f7b9c2 100644
    a b monitor_owning_controller_process(const char *process_spec) 
    65266526            msg);
    65276527    owning_controller_process_spec = NULL;
    65286528    tor_cleanup();
    6529     exit(0);
     6529    exit(1);
    65306530  }
    65316531}
    65326532
  • src/or/main.c

    diff --git a/src/or/main.c b/src/or/main.c
    index 9709aebeb..5fa3869ff 100644
    a b check_ed_keys_callback(time_t now, const or_options_t *options) 
    15561556          generate_ed_link_cert(options, now, new_signing_key > 0)) {
    15571557        log_err(LD_OR, "Unable to update Ed25519 keys!  Exiting.");
    15581558        tor_cleanup();
    1559         exit(0);
     1559        exit(1);
    15601560      }
    15611561    }
    15621562    return 30;
    try_locking(const or_options_t *options, int err_if_locked) 
    31683168        r = try_locking(options, 0);
    31693169        if (r<0) {
    31703170          log_err(LD_GENERAL, "No, it's still there.  Exiting.");
    3171           exit(0);
     3171          exit(1);
    31723172        }
    31733173        return r;
    31743174      }