]> git.ardis.lu - csvio/commitdiff
Unlink file on keyboard interrupt
authorArdis Lu <ardisglu@gmail.com>
Sat, 15 Feb 2025 07:06:00 +0000 (23:06 -0800)
committerArdis Lu <ardisglu@gmail.com>
Sat, 15 Feb 2025 07:06:00 +0000 (23:06 -0800)
benchmark/core.bench.js

index 22d04c68538f9d6bc329d85dc4470e9fdd9b2e74..1032992cb208cfef4a28df633e96726fc2260911 100644 (file)
@@ -8,6 +8,7 @@ const NAME_LENGTH = 15;
 
 const temp = await createTempFile();
 process.on('exit', () => unlinkSync(temp));
+process.on('SIGINT', () => process.exit());
 
 let iter = 0;
 await benchmarkIterations('1MB Write'.padEnd(NAME_LENGTH, '.'), 20, async () => {
This page took 0.0406 seconds and 4 git commands to generate.