diff --git a/bindings/js/minify.go b/bindings/js/minify.go index c7dee2bfe4..5060ffcb1f 100644 --- a/bindings/js/minify.go +++ b/bindings/js/minify.go @@ -166,7 +166,9 @@ func minifyFile(cmediatype, cinput, coutput *C.char) *C.char { //export minifyCleanup func minifyCleanup() { - os.Exit(0) + // This will fix the worker thread segfault test by explicitly ending the node + // process with a 0 signal + // os.Exit(0) } func main() {} diff --git a/bindings/js/test/worker.js b/bindings/js/test/worker.js index 06422ad51b..56ba538d41 100644 --- a/bindings/js/test/worker.js +++ b/bindings/js/test/worker.js @@ -19,6 +19,7 @@ if (isMainThread) { throw "unexpected output using worker threads: '"+output+"' instead of '"+expected+"'"; } await worker.terminate(); + console.log("success!"); // this needs to be printed } else { const { config, string } = await import('@tdewolff/minify'); config({'html-keep-document-tags': true})