Skip to content

Commit a6a4bc7

Browse files
authored
UnixSignal: Add SIGCONT (#192)
I'm using swift-service-lifecycle's UnixSignal in a text UI library, and needed SIGCONT. It's probably not super relevant in the service use case, but it looks like UnixSignal is the best way to handle signals, service or not, and I don't know if there's a downside to the library supporting it?
1 parent 0af4033 commit a6a4bc7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Sources/UnixSignals/UnixSignal.swift

+6
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ public struct UnixSignal: Hashable, Sendable, CustomStringConvertible {
3737
case sigalrm
3838
case sigquit
3939
case sigwinch
40+
case sigcont
4041
}
4142

4243
private let wrapped: Wrapped
@@ -71,6 +72,7 @@ public struct UnixSignal: Hashable, Sendable, CustomStringConvertible {
7172
public static let sigalrm = Self(.sigalrm)
7273
/// Signal when the window is resized.
7374
public static let sigwinch = Self(.sigwinch)
75+
public static let sigcont = Self(.sigcont)
7476
}
7577

7678
extension UnixSignal.Wrapped: Hashable {}
@@ -101,6 +103,8 @@ extension UnixSignal.Wrapped: CustomStringConvertible {
101103
return "SIGALRM"
102104
case .sigwinch:
103105
return "SIGWINCH"
106+
case .sigcont:
107+
return "SIGCONT"
104108
}
105109
}
106110
}
@@ -130,6 +134,8 @@ extension UnixSignal.Wrapped {
130134
return SIGALRM
131135
case .sigwinch:
132136
return SIGWINCH
137+
case .sigcont:
138+
return SIGCONT
133139
}
134140
}
135141
}

0 commit comments

Comments
 (0)