pub fn new(signals: &[Signal]) -> io::Result<Signals> {
        let mut mask = SigSet::empty();
        for &s in signals {
            mask.add(s);
        }

        // Mask the signals for this thread
        mask.thread_block()?;
        // Create the SignalFd
        let sfd = SignalFd::with_flags(&mask, SfdFlags::SFD_NONBLOCK | SfdFlags::SFD_CLOEXEC)?;

        Ok(Signals {
            sfd: Generic::new(sfd, Interest::READ, Mode::Level),
            mask,
        })
    }
/// Create a new signal event source listening on the specified list of signals
Create a new signal event source listening on the specified list of signals
Create a new signal event source listening on the specified list of signals
pub fn new(signals: &[Signal]) -> io::Result<Signals> {
        let mut mask = SigSet::empty();
        for &s in signals {
            mask.add(s);
        }
        // Mask the signals for this thread
        mask.thread_block()?;
        // Create the SignalFd
        let sfd = SignalFd::with_flags(&mask, SfdFlags::SFD_NONBLOCK | SfdFlags::SFD_CLOEXEC)?;
        Ok(Signals {
            sfd: Generic::new(sfd, Interest::READ, Mode::Level),
            mask,
        })
    }
pub fn new ( signals : & [ Signal ] ) -> io :: Result < Signals > { let mut mask = SigSet :: empty ( ) ; for & s in signals { mask . add ( s ) ; } // Mask the signals for this thread mask . thread_block ( ) ? ; // Create the SignalFd let sfd = SignalFd :: with_flags ( & mask , SfdFlags :: SFD_NONBLOCK | SfdFlags :: SFD_CLOEXEC ) ? ; Ok ( Signals { sfd : Generic :: new ( sfd , Interest :: READ , Mode :: Level ) , mask , } ) }
Create a new signal event source listening on the specified list of signals
Create a new signal event source listening on the specified list of signals
signals
&[Signal]
signals
&[Signal]