SignalSet
public struct SignalSet
SignalSet is a set of signals.
-
Creates a SignalSet filled with all signals if fill is true, or empty if false.
Declaration
Swift
public init(fill: Bool) throws -
Creates a SignalSet with just the specified signals inserted.
Declaration
Swift
public init(insert signals: [Signal]) throws
-
Inserts
signalinto the SignalSet.Declaration
Swift
public mutating func insert(signal: Signal) throws -
Removes
signalfrom the SignalSet.Declaration
Swift
public mutating func remove(signal: Signal) throws -
Returns true if the SignalSet contains
signal.Declaration
Swift
public func contains(signal: Signal) throws -> Bool -
Blocks (or unblocks) the signals from this SignalSet, depending the specified
mode. See sigprocmask(2) for details.Declaration
Swift
public func block(mode: BlockMode = .setMask) throws -> SignalSet -
Returns the C sigset_t struct for this SignalSet.
Declaration
Swift
public func toCStruct() -> sigset_t -
Linux only. Creates a SignalFileDescriptor for this SignalSet. See signalfd(2) for details.
Declaration
Swift
public mutating func fileDescriptor(replacing fd: FileDescriptor? = nil, flags: Flags = []) throws -> SignalFileDescriptor
-
BlockMode indicates the block mode for a SignalSet. See sigprocmask(2) for details.
See moreDeclaration
Swift
public enum BlockMode
SignalSet Struct Reference