Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Method

KillProcesses

ModuleOperatingSystem
LibraryCore
Action


Excerpt
Action to terminate
Terminate a running process (or set of process instances of the same executable).


Parameters

Executable (string): The filename of the executable to kill.

For Windows, this is the basename (e.g. "notepad.exe").

For Linux it can be the basename (e.g. "firefox") or the full path (e.g. "/usr/lib64/firefox/firefox").

Return values

Killed (int): The number of processes successfully killed.

Failed (int): The number of processes that could not be killed.

Example


Code Block
languageperl
 OperatingSystem.KillProcesses(Executable:"notepad.exe");


Code Block
languageperl
 OperatingSystem.KillProcesses(Executable:"/usr/lib64/firefox/firefox");


Platforms
  • Windows
  • Linux
  • MacOS
  • Solaris Intel
  • Solaris Sparc
  • Android - no
Notes