pub fn create_sigset(signals: &[c_int]) -> errno::Result<sigset_t> {
    // sigset will actually be initialized by sigemptyset below.
    let mut sigset: sigset_t = unsafe { mem::zeroed() };

    // Safe - return value is checked.
    let ret = unsafe { sigemptyset(&mut sigset) };
    if ret < 0 {
        return errno::errno_result();
    }

    for signal in signals {
        // Safe - return value is checked.
        let ret = unsafe { sigaddset(&mut sigset, *signal) };
        if ret < 0 {
            return errno::errno_result();
        }
    }

    Ok(sigset)
}
/// Creates `sigset` from an array of signal numbers.
///
/// This is a helper function used when we want to manipulate signals.
Creates `sigset` from an array of signal numbers.
This is a helper function used when we want to manipulate signals.
Creates ` sigset ` from an array of signal numbers . This is a helper function used when we want to manipulate signals .
pub fn create_sigset(signals: &[c_int]) -> errno::Result<sigset_t> {
    // sigset will actually be initialized by sigemptyset below.
    let mut sigset: sigset_t = unsafe { mem::zeroed() };
    // Safe - return value is checked.
    let ret = unsafe { sigemptyset(&mut sigset) };
    if ret < 0 {
        return errno::errno_result();
    }
    for signal in signals {
        // Safe - return value is checked.
        let ret = unsafe { sigaddset(&mut sigset, *signal) };
        if ret < 0 {
            return errno::errno_result();
        }
    }
    Ok(sigset)
}
pub fn create_sigset ( signals : & [ c_int ] ) -> errno :: Result < sigset_t > { // sigset will actually be initialized by sigemptyset below. let mut sigset : sigset_t = unsafe { mem :: zeroed ( ) } ; // Safe - return value is checked. let ret = unsafe { sigemptyset ( & mut sigset ) } ; if ret < 0 { return errno :: errno_result ( ) ; } for signal in signals { // Safe - return value is checked. let ret = unsafe { sigaddset ( & mut sigset , * signal ) } ; if ret < 0 { return errno :: errno_result ( ) ; } } Ok ( sigset ) }
Creates `sigset` from an array of signal numbers.
Creates ` sigset ` from an array of signal numbers .
signals
&[c_int]
signals
&[c_int]