I am trying to kill the application in Ubuntu. I have the following code:
import {ChildProcess, exec} from "child_process";
export default class VisiviTTS {
private static process?: ChildProcess;
public static speak(text: string): void {
this.process = exec(`espeak -v czech "${text}"`);
}
public static stop() {
this.process?.kill("SIGINT");
}
}
On ArchLinux, everything works. On Ubuntu, it does not kill the process. I have tried SIGTERM
, SIGKILL
, destroying stderr
and stdout
, emitting exit
and kill
on it, but without any success.