Skip to content

Commit 4c759dd

Browse files
authored
Merge pull request #1199 from pi-hole/fix/signals
Clarify signal documentation
2 parents e7f2340 + 75eae89 commit 4c759dd

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

docs/ftldns/signals.md

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,13 @@ When FTL receives a `SIGHUP`, it clears the entire DNS cache, and then
3333

3434
While `SIGHUP` updates/flushes almost everything, such a massive operation is often not necessary. Hence, we added several small real-time signals available for fine-grained control of what FTL does. When you see `SIGHUP` as a "big gun", the real-time signals are rather the "scalpel" to serve rather specific needs.
3535

36-
Real-time signals are not guaranteed to have the same number on all operating systems. FTL will adapt accordingly. For the signals described below, we will always specify them with the real-time signal ID and the *typical* signal number in parentheses.
37-
38-
Real-time signal can always be executed relative to the first (= minimum) real-time signal just like (for real-time signal 0):
36+
Real-time signals are not guaranteed to have the same number on all operating systems as the value of the constant `SIGRTMIN` may vary. For the signals described below, we recommend using the exact signal number described in the parentheses, e.g., real-time signal 0 (35) can be sent like:
3937

4038
```bash
41-
sudo pkill -SIGRTMIN+0 pihole-FTL
39+
sudo pkill -SIG35 pihole-FTL
4240
```
4341

44-
## Real-time signal 0
42+
## Real-time signal 0 (35)
4543

4644
This signal does:
4745

@@ -55,30 +53,30 @@ The most important difference to `SIGHUP` is that the DNS cache itself is **not*
5553

5654
This is the preferred signal to be used after manipulating the `gravity.db` database manually as it reloads only what is needed in this case.
5755

58-
## Real-time signal 1
56+
## Real-time signal 1 (36)
5957

6058
*Reserved* - Currently ignored
6159

62-
## Real-time signal 2
60+
## Real-time signal 2 (37)
6361

6462
*Reserved* - Used for internal signaling that a fork or thread crashed and needs to inform the main process to shut down, storing the last (valid) queries still into the long-term database.
6563

66-
## Real-time signal 3
64+
## Real-time signal 3 (38)
6765

6866
Reimport alias-clients from the database and recompute affected client statistics.
6967

70-
## Real-time signal 4
68+
## Real-time signal 4 (39)
7169

7270
Re-resolve all clients and forward destination hostnames. This forces refreshing hostnames as in that the usual "resolve only recently active clients" condition is ignored. The re-resolution adheres to the specified `REFRESH_HOSTNAMES` config option meaning that this option may not try to resolve all hostnames.
7371

74-
## Real-time signal 5
72+
## Real-time signal 5 (40)
7573

7674
Re-parse ARP/neighbour-cache now to update the Network table now
7775

78-
## Real-time signal 6
76+
## Real-time signal 6 (41)
7977

8078
*reserved* - Signal used internally to terminate the embedded `dnsmasq`. Please do not use this signal to prevent misbehaviour.
8179

82-
## Real-time signal 7
80+
## Real-time signal 7 (42)
8381

8482
Scan binary search lookup tables for hash collisions and report if any are found. This is a debugging signal and not meaningful production. Scanning the lookup tables is a time-consuming operation and may stall DNS resolution for a while on low-end devices.

0 commit comments

Comments
 (0)