mirror of
https://github.com/NLnetLabs/routinator.git
synced 2024-05-19 06:50:04 +00:00
server: move signal handler to sigusr1
This commit is contained in:
@ -355,7 +355,6 @@ impl Server {
|
|||||||
/// Runs the command.
|
/// Runs the command.
|
||||||
pub fn run(self, mut config: Config) -> Result<(), ExitError> {
|
pub fn run(self, mut config: Config) -> Result<(), ExitError> {
|
||||||
let mut repo = Repository::new(&config, false, true)?;
|
let mut repo = Repository::new(&config, false, true)?;
|
||||||
let signal = Self::create_signal_notifier(&[signal_hook::SIGHUP])?;
|
|
||||||
config.switch_logging(self.detach)?;
|
config.switch_logging(self.detach)?;
|
||||||
|
|
||||||
let history = OriginsHistory::new(config.history_size, config.refresh);
|
let history = OriginsHistory::new(config.history_size, config.refresh);
|
||||||
@ -988,7 +987,7 @@ impl SignalWait {
|
|||||||
runtime: &mut tokio::runtime::Runtime
|
runtime: &mut tokio::runtime::Runtime
|
||||||
) -> Result<crossbeam_channel::Receiver<i32>, Error> {
|
) -> Result<crossbeam_channel::Receiver<i32>, Error> {
|
||||||
let (s, r) = crossbeam_channel::bounded(100);
|
let (s, r) = crossbeam_channel::bounded(100);
|
||||||
let signals = match signal_hook::iterator::Signals::new(&[signal_hook::SIGHUP]) {
|
let signals = match signal_hook::iterator::Signals::new(&[signal_hook::SIGUSR1]) {
|
||||||
Ok(r) => r,
|
Ok(r) => r,
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
error!("Attaching signals failed: {}", err);
|
error!("Attaching signals failed: {}", err);
|
||||||
|
Reference in New Issue
Block a user