Skip to content

Commit

Permalink
Fix Exiting Beahviour (#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
pipobscure committed Nov 5, 2020
1 parent 6a3bb59 commit f650d82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "fsevents",
"version": "2.2.0",
"version": "2.2.1",
"description": "Native Access to MacOS FSEvents",
"main": "fsevents.js",
"types": "fsevents.d.ts",
Expand Down
1 change: 1 addition & 0 deletions src/fsevents.c
Expand Up @@ -50,6 +50,7 @@ void fse_environment_destroy(napi_env env, void *voidenv, void *hint)
{
fse_environment_t *fseenv = voidenv;
CFRunLoopRemoveSource(fseenv->loop, fseenv->source, kCFRunLoopDefaultMode);
CFRunLoopStop(fseenv->loop);
pthread_join(fseenv->thread, NULL);
fseenv->thread = NULL;
pthread_mutex_destroy(&fseenv->lock);
Expand Down
8 changes: 4 additions & 4 deletions test/utils/misc.js
Expand Up @@ -8,14 +8,14 @@ exports.capture = () => {
exports.run = async (test) => {
try {
await test();
process.exit(0);
} catch(err) {
console.log(' ---');
//process.exit(0);
} catch (err) {
console.log(" ---");
console.log(` message: ${err.message}`);
console.log(` actual: ${JSON.stringify(err.actual)}`);
console.log(` expected: ${JSON.stringify(err.expected)}`);
console.log(` source: ${err.stack.split(/\r?\n/)[1].trim()}`);
console.log(' ...');
console.log(" ...");
process.exit(1);
}
};

0 comments on commit f650d82

Please sign in to comment.