 #endif
 
 public final class Selector {
+    private var open: Bool
 #if os(Linux)
     private typealias EventType = epoll_event
     private let eventsCapacity = 2048

    }

    public func close() throws {
        let _ = try wrapSyscall({ $0 >= 0 }, function: "close") {
#if os(Linux)
            // Ignore closing error for eventfd

        eventfd = try wrapSyscall({ $0 >= 0 }, function: "eventfd") {
            CEventfd.eventfd(0, Int32(EFD_CLOEXEC | EFD_NONBLOCK))
        }
        self.open = true

        var ev = epoll_event()
        ev.events = Selector.toEpollEvents(interested: .read)
