DEV Community

Cover image for Watch the Directory, Not the File: A Reliable macOS Watcher
Mustafa ERBAY
Mustafa ERBAY

Posted on Originally published at mustafaerbay.com.tr

Watch the Directory, Not the File: A Reliable macOS Watcher

This blog's src/content/blog tree holds 2,856 .mdx files; the whole of src/ is
6,285 files.
When I save one of them the dev server has to notice, and for that something has to be
listening to the file system. Node's tool for the job is fs.watch. The name is
innocent, the signature takes two parameters, and the documentation politely says the
API is not fully consistent across platforms — which is an upfront admission that you
should measure it on your own machine before trusting it.

So I put it on the bench. The result fits in one sentence: on macOS the event type does not
tell you what happened, only that you should go look; and whether you keep hearing
anything at all depends on what you chose to watch.
Watch the file and you go silently
deaf after one editor save. Watch the directory and you keep hearing events even if the
file is deleted and recreated. Below are the measurements behind those two sentences,
the mechanism underneath, and a watcher recipe built on both.

On the Linux side I asked the same question from the cost angle:
inotify charges 1.5 KiB of kernel memory per watch
answered "how many files can I watch". This post asks a different one: when you do watch,
what are you told, and can you trust it.

The setup

Every measurement ran on the same machine: macOS 26.6.2 (Darwin 25.6.0), Apple silicon,
APFS, Node 22.16.0 with its bundled libuv 1.49.2. The experiments used fresh mkdtemp
directories under /tmp; I repeated each table three times and report the median where
values moved. To read the raw FSEvents flags I compiled a small C program against
CoreServices — there is no other way to see the flags underneath the event Node hands you.

One distinction matters most: on macOS Node uses kqueue(2) when the watched path is a
file and FSEvents when it is a directory. The documentation mentions this in one
line of its availability section; in the libuv source it is an if — if the path is not a
directory, the code jumps straight to the kqueue fallback without trying FSEvents. That
single line is the reason for everything that follows.

Diagram

Watching a file: one save is enough

The first experiment is the simplest arrangement. I create a file, watch it directly,
then in order: append in place, append in place again, and the thing editors do — write
a temporary file and rename it over the original. All three runs produced the same output:

yerinde ekleme               olay=1  [[0,"change","post.mdx"]]
ikinci yerinde ekleme        olay=1  [[502,"change","post.mdx"]]
atomik kaydetme (rename)     olay=1  [[1005,"rename","post.mdx"]]
rename SONRASI ekleme        olay=0  []
rename sonrasi 2. ekleme     olay=0  []
Enter fullscreen mode Exit fullscreen mode

The last two lines are the whole point. After the rename I wrote to the file twice more;
the watcher said nothing. It did not throw, did not close, did not emit an error event.
It just went quiet. Node's documentation describes this as expected behaviour: on Linux
and macOS fs.watch resolves the path to an inode and watches that inode, so when the
path is deleted and recreated the new file gets a new inode and the watcher keeps staring
at the old one.

The subtle part is that this is not an exotic scenario. I wondered which tools modify a
file in place and which put a new one in its place, so I checked the inode with
stat -f %i on the same machine:

Tool inode
append with >> unchanged
Python open(file, 'w') unchanged
Vim 9.1, default settings unchanged
sed -i '' changed
temporary file + mv changed
git checkout -- file changed

Vim updating my file in place surprised me — remember that this behaviour depends on the
editor and its settings, so measure your own. But sed -i and git checkout are on the
list: switching a branch or running a bulk text fix kills your file watcher. Nothing
changes on the outside, either: you still hold the object, the process is still up, only
the other side has stopped talking.

Watching the directory: same operation, different label

I repeated the same operations while watching the directory the file lives in. Three
runs, byte-identical output:

yerinde ekleme                 olay= 3  ["change:fswatch-xVkDe6","rename:post.mdx","rename:post.mdx"]
atomik kaydetme                olay= 3  ["rename:.post.tmp","rename:post.mdx","rename:post.mdx"]
rename SONRASI ekleme          olay= 1  ["rename:post.mdx"]
yeniden adlandirma             olay= 2  ["rename:post.mdx","rename:post-yeni.mdx"]
silme                          olay= 1  ["rename:post-yeni.mdx"]
alt dizin olusturma            olay= 1  ["rename:alt"]
ALT dizinde dosya (recursive yok) olay= 0  []
Enter fullscreen mode Exit fullscreen mode

The third line is the good news: a directory watcher survives the atomic save. The first
line is the bad news. A single appendFileSync produced three events, one of them
carrying the watched directory's own name, two of them labelled rename. Nothing was
renamed: one line was appended to a file, that is all.

To see how loose the label is I listened to the same file at the same instant with two
watchers — one on the file (the kqueue path), one on the directory (the FSEvents path):

yerinde ekleme ->  dosya izleyici: ["change:post.mdx"]  dizin izleyici: ["rename:post.mdx"]
yalniz utimes  ->  dosya izleyici: ["change:post.mdx"]  dizin izleyici: ["change:post.mdx"]
yalniz chmod   ->  dosya izleyici: ["change:post.mdx"]  dizin izleyici: ["change:post.mdx"]
Enter fullscreen mode Exit fullscreen mode

One physical event, two different labels. The event type describes how you are listening,
not what happened.

So how often does rename show up? I fixed the protocol — fresh directory, create the
file, wait 12 seconds, start the directory watcher, append in place 200 ms later — and ran
it 20 times:

sira  : rename rename change rename change change change rename rename change
        change change rename change change rename change rename change change
ozet  : {"change":12,"rename":8,"bos":0,"cokOlay":0}
Enter fullscreen mode Exit fullscreen mode

Exactly the same operation, same machine, same Node: 12 of 20 trials said change, 8 said
rename. Not a single event was lost, which is the good part; but code branching on the
label would take the wrong branch in two of every five cases. This is not a "behaves
differently on some platforms" warning. It is one platform, one operation, two answers.

Where the label comes from

libuv's macOS code sorts the flags into groups and then decides. The relevant block at tag
v1.49.2 (MIT licensed, src/unix/fsevents.c):

event->events = UV_RENAME;

if (0 == (flags & kFSEventsRenamed)) {
  if (0 != (flags & kFSEventsModified) ||
      0 == (flags & kFSEventStreamEventFlagItemIsDir))
    event->events = UV_CHANGE;
}
Enter fullscreen mode Exit fullscreen mode

The kFSEventsRenamed group consists of the ItemCreated, ItemRemoved and
ItemRenamed flags; if any of them is present the answer is rename outright. For Node
to say rename, FSEvents must have delivered one of those three bits for that path.

The oddity in the first directory table — an event arriving under the watched directory's
own name — is settled in the same file. When the event's path is the watched directory
itself, libuv recovers the basename and strips those bits: flags &= ~kFSEventsRenamed,
under a comment saying Created and Removed seem to be always set but do not make sense.
That is why the directory's own event comes as change while the file inside it says
rename.

Next came the raw flags. I attached the C program to the same directory and repeated the
operations:

path=/private/tmp/fsflags-LSSR/post.mdx flags=0x00011000 ItemModified ItemIsFile
path=/private/tmp/fsflags-LSSR/post.mdx flags=0x00011400 ItemModified ItemInodeMetaMod ItemIsFile
path=/private/tmp/fsflags-LSSR/post.mdx flags=0x00015400 ItemModified ItemInodeMetaMod ItemChangeOwner ItemIsFile
path=/private/tmp/fsflags-LSSR/.post.tmp flags=0x00019900 ItemCreated ItemRenamed ItemModified ItemXattrMod ItemIsFile
path=/private/tmp/fsflags-LSSR/post.mdx flags=0x00010800 ItemRenamed ItemIsFile
path=/private/tmp/fsflags-LSSR/post.mdx flags=0x00015c00 ItemRenamed ItemModified ItemInodeMetaMod ItemChangeOwner ItemIsFile
path=/private/tmp/fsflags-LSSR/post.mdx flags=0x00010800 ItemRenamed ItemIsFile
path=/private/tmp/fsflags-LSSR/yeni.mdx flags=0x00010800 ItemRenamed ItemIsFile
path=/private/tmp/fsflags-LSSR/yeni.mdx flags=0x00010a00 ItemRemoved ItemRenamed ItemIsFile
Enter fullscreen mode Exit fullscreen mode

The nine lines in order: the in-place append, touch, chmod, the atomic save (the
temporary file first, then two events for the target), the rename (old and new name), and
the delete. The append carries ItemModified only — and with that flag the if above
produces UV_CHANGE. Source and measurement agree here.

What did not agree was the rename case I wanted to catch. I ran the same loop (install
the watcher, append in place N ms later, close the watcher; five delays) with the C
observer attached and without it:

# WITHOUT the C observer (run 1 of 3; in runs 2 and 3 all five cells said rename)
izleyici+ 200 ms yazdim | dosya yasi  13 s | ["rename:post.mdx"]
izleyici+ 500 ms yazdim | dosya yasi  16 s | ["rename:post.mdx"]
izleyici+1000 ms yazdim | dosya yasi  18 s | ["rename:post.mdx"]
izleyici+2000 ms yazdim | dosya yasi  22 s | ["rename:post.mdx"]
izleyici+3000 ms yazdim | dosya yasi  27 s | ["change:post.mdx"]

# WITH the C observer attached (same loop, same delays)
izleyici+ 200ms | yazma=13:50:06.782 | ["13:50:06.796 change:post.mdx"]
izleyici+ 500ms | yazma=13:50:08.991 | ["13:50:09.004 change:post.mdx"]
izleyici+1000ms | yazma=13:50:11.698 | ["13:50:11.709 change:post.mdx"]
izleyici+2000ms | yazma=13:50:15.402 | ["13:50:15.412 change:post.mdx"]
izleyici+3000ms | yazma=13:50:20.108 | ["13:50:20.121 change:post.mdx"]
Enter fullscreen mode Exit fullscreen mode

(izleyici+N ms yazdim means "wrote N ms after the watcher started"; dosya yasi is the
file's age.) Without the observer, 14 of 15 cells said rename; with it attached, all five
said change and the C side showed ItemModified alone. The measuring tool changes what it
measures: attaching a second FSEvents stream makes the event I was hunting disappear.

The gap between this loop's rename rate (14/15) and the 20-trial rate in the previous
section (8/20) is a protocol difference: there, every trial started with a fresh directory
and a fresh file; here the same directory and the same file are reused five times over. Two
protocols, two rates — and the same conclusion, that the label is not fixed.

Whether the directory was already being watched turned out not to decide it either:

kosu 1 | ilk izleyici: ["change:post.mdx"]      | zaten izlenen dizin: ["rename:post.mdx"]
kosu 2 | ilk izleyici: ["change:post.mdx"]      | zaten izlenen dizin: ["change:post.mdx"]
kosu 3 | ilk izleyici: ["rename:post.mdx"]      | zaten izlenen dizin: ["change:post.mdx"]
Enter fullscreen mode Exit fullscreen mode

(ilk izleyici is the first watcher on a fresh directory, zaten izlenen dizin a directory
already under watch.) I varied the file's age and the identity of the writing process the
same way; none of them produced a stable boundary. So the honest answer is this: the
rename labels come from FSEvents also sending an ItemCreated/ItemRenamed bit for that
path in some circumstances, but I could not isolate which condition triggers it.

Apple's guide never expected you to build logic on that label anyway. It tells you to scan
the directory named in each event, and it states plainly that the granularity of
notifications is at the directory level: it tells you only that something in the directory
changed, not what changed. Any branch resting on the event type rests on a detail the
documentation never promised. Where I cannot diagnose, I do not guess — but the practical
conclusion is firm: do not branch on the event type.

recursive: the platform the docs never list

The documentation's version history for the recursive option says recursive support was
added for Linux, AIX and IBMi; the option itself carries an "only on supported platforms"
note, and that list of platforms appears nowhere — macOS is not named next to recursive.
Where the docs go quiet, measuring is what is left. On Node 22.16.0:

3. seviyede ekleme                 ["rename:blog/tutorials/derin.mdx"]
3. seviyede yeni dosya             ["rename:blog/tutorials/yeni.mdx"]
yeni alt dizin                     ["rename:blog/career"]
YENI alt dizinde dosya             ["rename:blog/career/a.mdx"]
recursive YOK, derin yazma         []
Enter fullscreen mode Exit fullscreen mode

It works. The filename also arrives as a relative path (blog/tutorials/derin.mdx), not
a bare name. A subdirectory created after the watcher started is covered automatically,
with no need to resubscribe — libuv handles the option explicitly as UV_FS_EVENT_RECURSIVE
in the very file quoted above, so the support is deliberate, merely unlisted in the docs.
The last line shows the boundary: without recursive, a write in a subdirectory is never
heard.

There is one more thing. When I deleted the watched directory and created a new one at the
same path, the watcher stayed alive:

kosu 1 | inode 457454747 -> 457454788 (DEGISTI) | yeni dosya: ["rename:yeni.mdx"] | sonra ekleme: ["rename:yeni.mdx"]
kosu 2 | inode 457454833 -> 457454860 (DEGISTI) | yeni dosya: ["rename:yeni.mdx"] | sonra ekleme: ["rename:yeni.mdx"]
kosu 3 | inode 457454887 -> 457454906 (DEGISTI) | yeni dosya: ["rename:yeni.mdx"] | sonra ekleme: ["rename:yeni.mdx"]
Enter fullscreen mode Exit fullscreen mode

The inode changed, the events kept coming, in all three runs. The documentation's sentence
about resolving the path to an inode and emitting nothing for the new one holds for the
file path (kqueue), not for the directory path on macOS. An FSEvents stream is bound to
the path, not the inode. I owe that distinction to measurement rather than to the docs,
and it is the side that helps you in practice: even if git checkout removes and recreates
a directory, your directory watcher stays up.

Cost: one descriptor per file

The answer to "why not just watch every file individually" is in the bookkeeping. The
numbers come from the 2,856 .mdx files in the content tree, counting open descriptors
with lsof alongside RSS:

Setup lsof records RSS
baseline (no watcher) 24 51.7 MiB
1 recursive directory watcher (whole tree) 24 51.9 MiB
500 file watchers 524 52.9 MiB
2,856 file watchers 2,880 58.7 MiB

Exactly one record per file — kqueue wants an fd for every watched path. (lsof counts
mapped libraries as well as descriptors; what matters here is the differences, not the
baseline.) A single FSEvents stream for the entire tree costs zero extra descriptors and
0.2 MiB. Three orders of magnitude apart.

What happens when the limit runs out is worth a measurement too, but first a surprise:
the shell's ulimit -n does not constrain Node. I set the shell's soft limit to 256
(launchd's maxfiles default is also 256) and Node raised its own soft limit:

=== kabuk: soft 256 (launchd varsayilani):
node prosesindeki ulimit -n (soft/hard): 1048575 / unlimited
tum 2856 dosya izlendi

=== kabuk: hard 300:
node prosesindeki ulimit -n (soft/hard): 300 / 300
286 izleyiciden sonra: EMFILE (watch)
recursive dizin izleyicisi: EMFILE
Enter fullscreen mode Exit fullscreen mode

With the hard limit at 300, 286 watchers were created and the 287th returned EMFILE.
The accounting lands exactly: counted through /dev/fd, the process starts with 14
descriptors already open, and 14 + 286 = 300, the hard limit itself. Same number in all
three runs. The EMFILE on the second line is not the watcher type's fault: at that
moment 286 fds were being held. Setting up only the
recursive directory watcher under the same hard limit worked fine, with the total staying
at 24.

How many events arrive: the coalescing window

libuv opens the FSEvents stream with a latency of 0.05 seconds (latency = 0.05 in the
source) and passes kFSEventStreamCreateFlagNoDefer alongside it, so the first event after
a quiet period arrives without waiting and the coalescing applies to events that keep
filling the window. A burst test shows what that means; the "elapsed" column is the
duration of the write loop itself, medians of three runs:

Write pattern Elapsed Callbacks
100 writes, no gap 4-7 ms 1
100 writes, 10 ms apart 1,095 ms 23
50 writes, 60 ms apart 3,055 ms 50
20 writes, 200 ms apart 4,021 ms 20

A hundred writes collapsed into one callback. In the 10 ms series, 23 callbacks landed
across 1,095 ms; dividing gives 47.6 ms per callback — I did not measure that number, I
derived it from two measurements, and it lines up with libuv's 50 ms window. At a 60 ms
gap the ratio becomes one to one: intervals wider than the window no longer merge.

The practical upshot: there is no point setting your debounce below 50 ms, because the
operating system coalesces before you get a chance to. I use 80 ms — short enough to be
imperceptible for a build triggered by a keystroke, long enough to turn 100 writes in the
same second into a single job.

The silence of lost events

Apple's guide explains that events can be dropped when communication between the kernel
and user space fails, and that you then receive an event with the KernelDropped or
UserDropped flag; when that happens you have to rescan the directories you are watching,
because there is no other way to learn what changed. The same guide notes that a dropped
event also carries MustScanSubDirs.

libuv collects those flags into its kFSEventsSystem group and skips them in one line of
the callback: if (flags & kFSEventsSystem) continue;. News of dropped events never
reaches the JavaScript side at all. MustScanSubDirs is not in that group, but since the
only thing crossing into JS is the 'rename'/'change' label, you cannot see it either:
it is indistinguishable from an ordinary event.

Only one conclusion follows: the event stream cannot be your single source of truth, so a
periodic reconciliation is mandatory. Its cost is timed as well — a full scan with
a stat for every file:

dosya: 3241 | tam tarama sureleri (ms): 17.0 17.2 18.3 18.7 35.2 | ortanca 18.3 ms
dosya: 6285 | tam tarama sureleri (ms): 34.5 34.7 36.0 37.2 98.1 | ortanca 36.0 ms
Enter fullscreen mode Exit fullscreen mode

The upper row is src/content/blog alone (3,241 files), the lower one the whole src/
tree: 6,285 files, 36 ms. A full reconciliation once a minute costs 0.06% of one core
(derived: 36 ms / 60,000 ms). Against the risk of losing events, that is cheap insurance.

The recipe

What all these measurements add up to is this design: watch the directory, never read the
event type, decide with stat, and rescan everything every so often.


export function watch(root, { debounce = 80, reconcileMs = 0, onChange, onError = () => {} }) {
  const state = new Map();                       // path -> ino:mtimeMs:size
  const signature = (s) => `${s.ino}:${s.mtimeMs}:${s.size}`;
  let priming = true;

  const scan = () => {
    let entries;
    try { entries = fs.readdirSync(root, { recursive: true, withFileTypes: true }); }
    catch (e) { onError(e); return; }            // the tree may be gone right now
    const seen = new Set();
    for (const entry of entries) {
      if (!entry.isFile()) continue;             // symlinks are out of scope
      const rel = path.relative(root, path.join(entry.parentPath, entry.name));
      seen.add(rel);
      let s; try { s = fs.statSync(path.join(root, rel)); } catch { continue; }
      const next = signature(s), prev = state.get(rel);
      if (prev === undefined) { state.set(rel, next); if (!priming) onChange('added', rel); }
      else if (prev !== next) { state.set(rel, next); onChange('changed', rel); }
    }
    for (const rel of [...state.keys()])
      if (!seen.has(rel)) { state.delete(rel); onChange('removed', rel); }
  };

  let timer = null;
  const w = fs.watch(root, { recursive: true }, () => {
    clearTimeout(timer);
    timer = setTimeout(scan, debounce);           // the event type is never read: just "go look"
  });
  w.on('error', onError);                         // EMFILE/ENOSPC must not die quietly
  scan();                                         // first scan AFTER the watcher is installed
  priming = false;                                // the priming scan emits nothing
  const tick = reconcileMs ? setInterval(scan, reconcileMs) : null;
  return { close: () => { w.close(); clearTimeout(timer); if (tick) clearInterval(tick); } };
}
Enter fullscreen mode Exit fullscreen mode

The order of those lines is not an accident. The fs.watch call comes before the first
scan, because Apple's guide tells you to start monitoring before you start scanning so you
do not miss changes; code that does it the other way round silently swallows anything that
changes between the scan and the subscription. The priming flag keeps that first scan
quiet: without it, startup emits one "added" per file in the tree — 2,856 of them on mine.

mtimeMs alone is not enough for the signature; ino and size belong in it too, because
only the inode catches a same-sized file put in place within the same millisecond. By the
same token, a change that preserves all three (a snapshot restore, a write of identical
size and timestamp) stays invisible to this signature; if that is your threat, hash the
content. The isFile() filter leaves symlinks out, so a config file reached through a
symlink needs its own handling. Finally, both readdirSync and watcher errors go to
onError — EMFILE, and ENOSPC on Linux, produce exactly the silent deafness this post
is about, so do not add your own.

I ran the recipe against every hard case in this post. Three runs, same result:

kurulus (1 mevcut dosya, hazirlik taramasi)  []
100 hizli yazma                            ["degisti:tutorials/a.mdx"] (beklenen: 1 degisti)
atomik kaydetme                            ["degisti:tutorials/a.mdx"] (beklenen: 1 degisti)
yeni alt dizin + dosya                     ["eklendi:career/b.mdx"] (beklenen: 1 eklendi)
silme                                      ["silindi:tutorials/a.mdx"] (beklenen: 1 silindi)
yeniden adlandirma                         ["eklendi:career/c.mdx","silindi:career/b.mdx"] (beklenen: 1 silindi + 1 eklendi)
Enter fullscreen mode Exit fullscreen mode

(The harness labels are Turkish: kurulus is startup, degisti/eklendi/silindi are
changed/added/removed, beklenen is expected.) A hundred writes became one logical change,
the atomic save produced no deafness, the file in the brand-new subdirectory was seen, the
rename split into two separate facts, and startup stayed quiet. Because the event type is
never read, the rename/change lottery stopped mattering.

One caveat about scale: scan is synchronous, so every debounce window stops the event
loop for as long as a full tree walk takes. On my 6,285-file tree that is 36 ms; on a
100k-file tree it becomes seconds, and for those seconds your server answers nobody. At
that size, scope the watch to a subtree, use fs.watch's own ignore option to drop
node_modules and .git, or make the scan asynchronous and chunked.

Where fs.watchFile actually earns its keep

The documentation calls fs.watchFile slower and less reliable, and it is right: the
default interval is 5,007 ms and every tick runs a stat. But it has a job. I ran both
side by side on the same file (three runs, values nearly identical):

Operation fs.watch fs.watchFile
append in place 0-1 ms 4,006 ms
atomic save 0-1 ms 2,021 ms
write after the rename no event 34 ms

Do not misread that 34 ms: fs.watchFile is not fast there, the operation simply landed
just before a polling tick. The expected latency is half a tick, about 2.5 seconds, with
5 seconds as the worst case. What matters is not the number but that the column has one at
all: the fast API stops talking once the file has been replaced, while the slow one polls
the path and therefore sees the new inode.

If you are watching a single configuration file — a .env, a certificate, a threshold
file — you do not care about seconds of latency; you do care about silent deafness. In that
case fs.watchFile is the right tool. You can shorten the delay with interval, but then
you are buying the polling cost. And there is Node's own warning to keep in view: fs.watch
offers no protection against malicious action on the file system, and a file substituted
under the same name can be reported as a change to the new file. Watching a secret file is
not the same as verifying that it has not been swapped; when the watch fires, check the
file's owner and mode as well.

Checklist

Ask your own setup these questions; the answers are all in the measurements above.

  • Are you watching a file path? Have you tested that the watcher still talks after one save from your editor? (Test: write a temp file, rename it over the original, then append one more line.)
  • Does your code have a branch like eventType === 'change'? Account for the 8 in 20 trials where the same operation reported rename on macOS.
  • What do you do when filename is null? The documentation says it is not guaranteed; the recipe never uses it.
  • How many watchers are you opening? One fd per file, or one stream per tree?
  • Is your debounce under 50 ms? If so, it is spinning for nothing.
  • Would you notice a lost event? News of dropped events never reaches JS; without periodic reconciliation your only defence is luck. Count how many changes your reconciliation finds before the events do — that counter is the only thing that tells you the stream works.
  • Do you run the same code on Linux? There recursive spends one inotify watch per directory, and when fs.inotify.max_user_watches fills up Node hands you ENOSPC — the post on what each watch costs shows how early that limit arrives. Without an error handler you get back on Linux exactly the silence you avoided on macOS.

What is left is what you watch

What I take from these measurements is more than a technical detail. A watch API looks
like the answer to "what happened", when what you are actually holding is a doorbell: when
it rings you have to go and look. Apple wrote this down plainly — the granularity of
notifications is at the directory level, and it tells you only that something in the
directory changed. Not because the bell is unhelpful, but because that is a bell's job.

The file system is the source of state; the event stream is only a hint that it moved. The
moment you draw that line, the rename/change lottery, the atomic-save deafness and the
lost events close with the same recipe, and you stop writing three special cases for them.

The same discipline applies to measuring tools. In this post I attached a second observer
to catch the flags behind the rename label, and the label itself vanished. I had the same
experience chasing output stuck in a pipe:
in the stdbuf post
the measuring tool turned out to be changing the buffering. File system events are no
different: increase the number of listeners and what you are listening to becomes
something slightly else.

Official Sources

Top comments (0)