blob: bd794628070311eec179b5750726a9981bda18f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
//! ref: composer/vendor/seld/signal-handler/src/SignalHandler.php
#[derive(Debug)]
pub struct SignalHandler;
// TODO(phase-d): disable signal handler at all for now.
impl SignalHandler {
pub const SIGINT: &'static str = "SIGINT";
pub const SIGTERM: &'static str = "SIGTERM";
pub const SIGHUP: &'static str = "SIGHUP";
pub fn create(_signals: Vec<String>, _callback: Box<dyn Fn(String, &SignalHandler)>) -> Self {
Self
}
pub fn unregister(&self) {}
pub fn exit_with_last_signal(&self) {
std::process::exit(0);
}
pub fn is_triggered(&self) -> bool {
false
}
}
|