From 8526b90bc4f0a1fbbfdb55b2a98807070cd3f034 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Wed, 9 Apr 2025 09:16:39 -0400 Subject: [PATCH] Ignore return value of signal() on Android (#266) See https://github.com/apple/swift-nio/pull/3181 and https://github.com/apple/swift-nio/issues/3180 --- Sources/HTTPServerWithQuiescingDemo/main.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/HTTPServerWithQuiescingDemo/main.swift b/Sources/HTTPServerWithQuiescingDemo/main.swift index a457931..23e0d0e 100644 --- a/Sources/HTTPServerWithQuiescingDemo/main.swift +++ b/Sources/HTTPServerWithQuiescingDemo/main.swift @@ -88,7 +88,8 @@ private func runServer() throws { quiesce.initiateShutdown(promise: fullyShutdownPromise) } - signal(SIGINT, SIG_IGN) + // assignment needed for Android due to non-nullable return type + _ = signal(SIGINT, SIG_IGN) signalSource.resume() do {