Skip to content

Commit a5329ff

Browse files
authored
TSCUtility: repair after #249 (#250)
1 parent b6e28a9 commit a5329ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/TSCUtility/InterruptHandler.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ public final class InterruptHandler {
4040
_ = Self.wasInterrupted
4141
_ = Self.wasInterruptedLock
4242
_ = Self.signalWatchingPipe
43+
#if !os(Windows)
4344
_ = Self.oldAction
45+
#endif
4446

4547
// Create a signal handler.
4648
self.signalHandler = { _ in
@@ -124,7 +126,7 @@ public final class InterruptHandler {
124126
deinit {
125127
#if os(Windows)
126128
SetConsoleCtrlHandler(self.signalHandler, false)
127-
CloseHandle(signalWatchingPipe[1])
129+
CloseHandle(Self.signalWatchingPipe[1])
128130
#else
129131
// Restore the old action and close the write end of pipe.
130132
sigaction(SIGINT, &Self.oldAction, nil)

0 commit comments

Comments
 (0)