We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 57d157c commit dc710a3Copy full SHA for dc710a3
1 file changed
Sources/ContainerizationOS/AsyncSignalHandler.swift
@@ -78,6 +78,16 @@ public final class AsyncSignalHandler: Sendable {
78
79
private let state: Mutex<State> = .init(State())
80
81
+ /// Create a new `AsyncSignalHandler` that catches all signals.
82
+ public static func catchAll() -> AsyncSignalHandler {
83
+ #if os(macOS)
84
+ let range = 1...31
85
+ #else
86
+ let range = 1...64
87
+ #endif
88
+ return create(notify: range.map { Int32($0) })
89
+ }
90
+
91
/// Create a new `AsyncSignalHandler` for the list of given signals `notify`.
92
/// The default signal handlers for these signals are removed and async handlers
93
/// added in their place. The async signal handlers that are installed simply
0 commit comments