MCPcopy Create free account
hub / github.com/benkuper/Chataigne / killProcess

Method killProcess

Source/Module/modules/system/os/OSModule.cpp:250–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

248}
249
250void 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
263void OSModule::checkAppControl()
264{

Callers 1

triggerInternalMethod · 0.80

Calls 1

triggerMethod · 0.80

Tested by

no test coverage detected