| 248 | } |
| 249 | |
| 250 | void OSModule::killProcess(const String& processName, bool hardKillMode) |
| 251 | { |
| 252 | #if JUCE_WINDOWS |
| 253 | int result = WinExec(String("taskkill " + String(hardKillMode ? "/f " : "") + "/im \"" + processName + "\"").getCharPointer(), SW_HIDE); |
| 254 | if (result < 31) LOGWARNING("Problem killing app " + processName); |
| 255 | #else |
| 256 | int result = system(String("killall " + String(hardKillMode ? "-9" : "-2") + " \"" + processName + "\"").getCharPointer()); |
| 257 | if (result != 0) LOGWARNING("Problem killing app " + processName); |
| 258 | #endif |
| 259 | |
| 260 | if (result) outActivityTrigger->trigger(); |
| 261 | } |
| 262 | |
| 263 | void OSModule::checkAppControl() |
| 264 | { |
no test coverage detected