MCPcopy Create free account
hub / github.com/SpartanJ/efsw / WatcherKqueue

Method WatcherKqueue

src/efsw/WatcherKqueue.cpp:42–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42WatcherKqueue::WatcherKqueue( WatchID watchid, const std::string& dirname,
43 FileWatchListener* listener, bool recursive,
44 FileWatcherKqueue* watcher, WatcherKqueue* parent ) :
45 Watcher( watchid, dirname, listener, recursive ),
46 mLastWatchID( 0 ),
47 mChangeListCount( 0 ),
48 mKqueue( kqueue() ),
49 mWatcher( watcher ),
50 mParent( parent ),
51 mInitOK( true ),
52 mErrno( 0 ) {
53 if ( -1 == mKqueue ) {
54 efDEBUG(
55 "kqueue() returned invalid descriptor for directory %s. File descriptors count: %ld\n",
56 Directory.c_str(), mWatcher->mFileDescriptorCount );
57
58 mInitOK = false;
59 mErrno = errno;
60 } else {
61 mWatcher->addFD();
62 }
63}
64
65WatcherKqueue::~WatcherKqueue() {
66 // Remove the children watchers ( sub-folders watches )

Callers

nothing calls this directly

Calls 2

c_strMethod · 0.80
addFDMethod · 0.80

Tested by

no test coverage detected