-
-
Notifications
You must be signed in to change notification settings - Fork 34.5k
Open
Labels
freebsdIssues and PRs related to the FreeBSD platform.Issues and PRs related to the FreeBSD platform.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.smartosIssues and PRs related to the SmartOS platform.Issues and PRs related to the SmartOS platform.
Description
Version
main (commit 159ae48)
Platform
SunOS smartos 5.11 joyent_20260122T000642Z i86pc i386 i86pc
Subsystem
fs
What steps will reproduce the bug?
const fs = require('fs');
const watcher = fs.watch('.', {
recursive: false // The test passes if this option is set to `true`.
});
watcher.on('change', function (event, filename) {
console.log(event, filename);
if (filename === 'file.txt') {
watcher.close();
}
});
setTimeout(function () {
fs.writeFileSync('file.txt', 'data');
}, 100);How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
change file.txt is written to the standard output and the process exits. This is what happens when the recursive option is set to true.
What do you see instead?
change null is written to the standard output and the process does not exit.
Additional information
No response
Metadata
Metadata
Assignees
Labels
freebsdIssues and PRs related to the FreeBSD platform.Issues and PRs related to the FreeBSD platform.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.smartosIssues and PRs related to the SmartOS platform.Issues and PRs related to the SmartOS platform.