提交 32c92b0b authored 作者: Serhij S's avatar Serhij S

panic docs

上级 7be58f0d
...@@ -275,7 +275,8 @@ pub fn metrics_exporter() -> metrics_exporter_prometheus::PrometheusBuilder { ...@@ -275,7 +275,8 @@ pub fn metrics_exporter() -> metrics_exporter_prometheus::PrometheusBuilder {
metrics_exporter_prometheus::PrometheusBuilder::new() metrics_exporter_prometheus::PrometheusBuilder::new()
} }
/// Sets panic handler to immediately kill the process and its childs with SIGKILL /// Sets panic handler to immediately kill the process and its childs with SIGKILL. The process is
/// killed when panic happens in ANY thread
#[cfg(target_os = "linux")] #[cfg(target_os = "linux")]
pub fn setup_panic() { pub fn setup_panic() {
std::panic::set_hook(Box::new(move |info: &PanicInfo| { std::panic::set_hook(Box::new(move |info: &PanicInfo| {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论