[PR #2813] [MERGED] Add SIGTERM signal handler #3335

Closed
opened 2026-03-16 11:38:12 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/2813
Author: @divergentdave
Created: 2/28/2025
Status: Merged
Merged: 3/1/2025
Merged by: @divergentdave

Base: mainHead: david/sigterm-handler


📝 Commits (1)

  • ae322c8 Add SIGTERM signal handler

📊 Changes

4 files changed (+39 additions, -6 deletions)

View changed files

📝 Cargo.lock (+13 -3)
📝 bin/Cargo.toml (+1 -1)
📝 bin/src/hickory-dns.rs (+17 -2)
📝 crates/server/src/server/server_future.rs (+8 -0)

📄 Description

This adds a SIGTERM signal handler in the binary crate. This is useful when running in a container as root, since the default SIGTERM signal handler doesn't kill programs running as root. This also makes use of the existing graceful shutdown feature, to finish handling in-flight queries over TCP, HTTP, etc.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/2813 **Author:** [@divergentdave](https://github.com/divergentdave) **Created:** 2/28/2025 **Status:** ✅ Merged **Merged:** 3/1/2025 **Merged by:** [@divergentdave](https://github.com/divergentdave) **Base:** `main` ← **Head:** `david/sigterm-handler` --- ### 📝 Commits (1) - [`ae322c8`](https://github.com/hickory-dns/hickory-dns/commit/ae322c8d161e83c30d27b8abb6194adfcf3d6f35) Add SIGTERM signal handler ### 📊 Changes **4 files changed** (+39 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+13 -3) 📝 `bin/Cargo.toml` (+1 -1) 📝 `bin/src/hickory-dns.rs` (+17 -2) 📝 `crates/server/src/server/server_future.rs` (+8 -0) </details> ### 📄 Description This adds a SIGTERM signal handler in the binary crate. This is useful when running in a container as root, since the default SIGTERM signal handler doesn't kill programs running as root. This also makes use of the existing graceful shutdown feature, to finish handling in-flight queries over TCP, HTTP, etc. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 11:38:12 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#3335
No description provided.