Repository navigation
Commit 76e8b64
authored
vfs: forward the watchFile listener through RealFSProvider
fs.watchFile() on a path served by a real-directory mount dispatches
to RealFSProvider.watchFile(), which ignored the supplied listener and
registered an empty function instead. The user callback never fired
after the file changed, and fs.unwatchFile(path, listener) could not
match the anonymous stub, so the stat watcher's poll timer stayed
registered and kept the process alive.
Accept the listener and pass it through to fs.watchFile() so the
callback fires on change and unwatchFile() removes it by identity.
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com>
Assisted-by: opencode
PR-URL: #66224
Fixes: #66223
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>1 parent f72100b commit 76e8b64
2 files changed
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
632 | 632 | | |
633 | 633 | | |
634 | 634 | | |
635 | | - | |
| 635 | + | |
636 | 636 | | |
637 | | - | |
| 637 | + | |
638 | 638 | | |
639 | 639 | | |
640 | 640 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
| 38 | + | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
44 | 56 | | |
0 commit comments