joyent/node — Issue #2095: Closing FSWatcher at arbitrary time leaves process running
Author: TrevorBurnham
Created: 2011-11-14 01:53:55+00:00
State: open

Tested under Node 0.6.1 under OS X:

var fs = require('fs');
var fswatcher = fs.watch('test.txt', function() {});
setTimeout(function(){
console.log('Closing FSWatcher...')
fswatcher.close();
}, 10);

I get the `"Closing FSWatcher..." output, and the `fs.watch` callback is no longer called when the target file changes, but the process fails to exit.

Related: #2094.