def __init__(self, root_dirs, worker, log): WatcherBase.__init__(self, worker, log) self.client_sock, self.srv_sock = create_sock_pair() self.fd_map = {} for d in frozenset(root_dirs): w = INotifyTreeWatcher(d, self.ignore_event) self.fd_map[w._inotify_fd] = w
def create_control_connection(self): if iswindows: self.control_in, self.control_out = create_sock_pair() else: r, w = os.pipe() os.set_blocking(r, False) os.set_blocking(w, True) self.control_in = open(w, 'wb') self.control_out = open(r, 'rb')
def create_control_connection(self): self.control_in, self.control_out = create_sock_pair()