Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Sources/UnixSignals/UnixSignal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public struct UnixSignal: Hashable, Sendable, CustomStringConvertible {
case sigquit
case sigwinch
case sigcont
case sigpipe
}

private let wrapped: Wrapped
Expand Down Expand Up @@ -75,6 +76,8 @@ public struct UnixSignal: Hashable, Sendable, CustomStringConvertible {
/// Signal when the window is resized.
public static let sigwinch = Self(.sigwinch)
public static let sigcont = Self(.sigcont)
/// Signal when a write is performed on a closed fd
public static let sigpipe = Self(.sigpipe)
}

extension UnixSignal.Wrapped: Hashable {}
Expand Down Expand Up @@ -107,6 +110,8 @@ extension UnixSignal.Wrapped: CustomStringConvertible {
return "SIGWINCH"
case .sigcont:
return "SIGCONT"
case .sigpipe:
return "SIGPIPE"
}
}
}
Expand Down Expand Up @@ -138,6 +143,8 @@ extension UnixSignal.Wrapped {
return SIGWINCH
case .sigcont:
return SIGCONT
case .sigpipe:
return SIGPIPE
}
}
}