Skip to content

Commit

Permalink
Utility: disable Signal on Windows
Browse files Browse the repository at this point in the history
Windows does not support the concept of signals and has no equivalent to
it.  Simply disable the interface to ensure that we do not accidentally
rely on it somewhere.
  • Loading branch information
compnerd committed Jun 1, 2023
1 parent 74520d0 commit 504db7d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/SwiftDocCUtilities/Utility/Signal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import Foundation

/// A handler that intercepts system signal-events.
#if !os(Windows)
public struct Signal {
/// List of all system signals that interrupt the program execution.
public static let all = [SIGHUP, SIGINT, SIGQUIT, SIGABRT, SIGKILL, SIGALRM, SIGTERM]
Expand All @@ -35,3 +36,4 @@ public struct Signal {
}
}
}
#endif

0 comments on commit 504db7d

Please sign in to comment.