Skip to content

Commit ca47623

Browse files
use SIGKILL to kill mysqld process on all operating systems
1 parent b4240c5 commit ca47623

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

src/libraries/Executor.ts

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,10 @@ class Executor {
3636
}
3737

3838
async #killProcess(process: ChildProcess): Promise<boolean> {
39-
let killed = false;
40-
4139
// If the process has already been killed, return true
4240
if (process.kill(0) === false) return true
4341

44-
if (os.platform() === 'win32') {
45-
const {error, stderr} = await this.#executeFile('taskkill', ['/pid', String(process.pid), '/t', '/f'])
46-
if (!error && !stderr) {
47-
killed = true;
48-
} else {
49-
this.logger.error(error || stderr)
50-
}
51-
} else {
52-
killed = process.kill()
53-
}
54-
return killed;
42+
return process.kill('SIGKILL')
5543
}
5644

5745
//Returns a path to the binary if it should be deleted

0 commit comments

Comments
 (0)