mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Adding 'SIGNAL HEARTBEAT' message that causes unscheduled heartbeat.
This commit is contained in:
parent
f179ff18f3
commit
8c135062e5
4
changes/feature9503
Normal file
4
changes/feature9503
Normal file
@ -0,0 +1,4 @@
|
||||
o Minor features (controller):
|
||||
- Add a "SIGNAL HEARTBEAT" Tor controller command that provokes
|
||||
writing unscheduled heartbeat message to the log. Implements
|
||||
feature 9503.
|
@ -1263,6 +1263,7 @@ static const struct signal_t signal_table[] = {
|
||||
{ SIGTERM, "INT" },
|
||||
{ SIGNEWNYM, "NEWNYM" },
|
||||
{ SIGCLEARDNSCACHE, "CLEARDNSCACHE"},
|
||||
{ SIGHEARTBEAT, "HEARTBEAT"},
|
||||
{ 0, NULL },
|
||||
};
|
||||
|
||||
|
@ -2137,6 +2137,9 @@ process_signal(uintptr_t sig)
|
||||
addressmap_clear_transient();
|
||||
control_event_signal(sig);
|
||||
break;
|
||||
case SIGHEARTBEAT:
|
||||
log_heartbeat(time(NULL));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user