Skip to content

Commit c626de9

Browse files
authored
Ignore return value of signal() on Android (#3181)
Fixes #3180 by ignoring return value of signal() on Android
1 parent 8a475ed commit c626de9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/NIOCrashTester/main.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,9 @@ func main() throws {
137137
defer {
138138
try! group.syncShutdownGracefully()
139139
}
140-
signal(SIGPIPE, SIG_IGN)
140+
141+
// explicit return type needed due to https://github.com/apple/swift-nio/issues/3180
142+
let _: ((Int32) -> Void)? = signal(SIGPIPE, SIG_IGN)
141143

142144
func runCrashTest(_ name: String, suite: String, binary: String) throws -> InterpretedRunResult {
143145
guard let crashTest = findCrashTest(name, suite: suite) else {

0 commit comments

Comments
 (0)