Commit 8c135062 authored by rl1987's avatar rl1987 Committed by Nick Mathewson
Browse files

Adding 'SIGNAL HEARTBEAT' message that causes unscheduled heartbeat.

parent f179ff18
Loading
Loading
Loading
Loading

changes/feature9503

0 → 100644
+4 −0
Original line number Diff line number Diff line
  o Minor features (controller):
    - Add a "SIGNAL HEARTBEAT" Tor controller command that provokes
      writing unscheduled heartbeat message to the log. Implements
      feature 9503.
+1 −0
Original line number Diff line number Diff line
@@ -1263,6 +1263,7 @@ static const struct signal_t signal_table[] = {
  { SIGTERM, "INT" },
  { SIGNEWNYM, "NEWNYM" },
  { SIGCLEARDNSCACHE, "CLEARDNSCACHE"},
  { SIGHEARTBEAT, "HEARTBEAT"},
  { 0, NULL },
};

+3 −0
Original line number Diff line number Diff line
@@ -2137,6 +2137,9 @@ process_signal(uintptr_t sig)
      addressmap_clear_transient();
      control_event_signal(sig);
      break;
    case SIGHEARTBEAT:
      log_heartbeat(time(NULL));
      break;
  }
}

+1 −0
Original line number Diff line number Diff line
@@ -119,6 +119,7 @@
 * conflict with system-defined signals. */
#define SIGNEWNYM 129
#define SIGCLEARDNSCACHE 130
#define SIGHEARTBEAT 131

#if (SIZEOF_CELL_T != 0)
/* On Irix, stdlib.h defines a cell_t type, so we need to make sure