A data link never notices that its source file changed on Windows.
NSDataLinkManager watches source files with inotify, which only Linux has.
The include of sys/inotify.h at Source/NSDataLinkManager.m:42 is guarded
on the HAVE_SYS_INOTIFY_H macro, and the watch table, -startMonitoring,
-monitorLoop and the inotify_add_watch calls sit behind the same condition
or behind an _inotifyFD that stays at -1.
Where the header is absent the manager still builds and still accepts links,
so nothing reports that monitoring is not running. The delegate is simply
never asked, and an application sees a link that never refreshes.
Tests/gui/NSDataLink/sourceMonitoring.m:98 fails on Windows for this reason
and passes on Linux. It writes to the source file and waits 5 seconds for the
delegate to be asked.
Windows has ReadDirectoryChangesW for the same purpose and macOS has kqueue,
so carrying this to either would mean a small watcher of its own behind the
manager's interface.
A data link never notices that its source file changed on Windows.
NSDataLinkManagerwatches source files with inotify, which only Linux has.The include of
sys/inotify.hatSource/NSDataLinkManager.m:42is guardedon the
HAVE_SYS_INOTIFY_Hmacro, and the watch table,-startMonitoring,-monitorLoopand theinotify_add_watchcalls sit behind the same conditionor behind an
_inotifyFDthat stays at -1.Where the header is absent the manager still builds and still accepts links,
so nothing reports that monitoring is not running. The delegate is simply
never asked, and an application sees a link that never refreshes.
Tests/gui/NSDataLink/sourceMonitoring.m:98fails on Windows for this reasonand passes on Linux. It writes to the source file and waits 5 seconds for the
delegate to be asked.
Windows has ReadDirectoryChangesW for the same purpose and macOS has kqueue,
so carrying this to either would mean a small watcher of its own behind the
manager's interface.