Programs using Logger sometimes resist SIGTERM / SIGINT

未關閉 適合新手
#177 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

@mikamikasuki 已經在處理了。

開始於 2026年10月2日。

  • #178 來自 @mikamikasuki —— 未關閉

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
82/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
ruby
領域
backend

研究方向

從 issue 中連結的 lib/logger/log_device.rb 裡的 Logger::LogDevice#close 開始,檢查關閉期間引發的例外是如何處理的。使用 Logger 1.6 重現 SIGTERM 或 SIGINT 情境,然後加入回歸測試覆蓋,以表明該訊號不會被靜默吞掉,且程序能正確接收到它。

由索引模型根據 Issue 內容生成。

描述

If a ruby program logs with Logger and happens to receive a signal while executing inside Logger::LogDevice's #close method, then the signal will be silently swallowed and the process will not be killed.

For example, when a program receives SIGTERM, it will cause a SignalException to be raised. The code linked above contains rescue Exception which will capture the SignalException and silently return a nil.

The program will then continue to execute.

Reproduced with Logger 1.6.

主要語言
Ruby
星號
161
分支
76
平均合併
2 天 5 小時
30 天內合併 PR
3

環境準備

這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ruby/logger 的其他 Issue

查看 ruby/logger 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。