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 signal into the SignalSet.

    Declaration

    Swift

    public mutating func insert(signal: Signal) throws
  • Removes signal from 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 more

    Declaration

    Swift

    public enum BlockMode
  • Linux only. Configure the file descriptor for a SignalSet.

    See more

    Declaration

    Swift

    public struct Flags: OptionSet