KillProcess
KillProcess[proc] kills the external process represented by the ProcessObject proc.
Examples
Start and kill a process:
proc = StartProcess[{"sleep", "100"}];
KillProcess[proc]Check process status:
proc = StartProcess[{"ls"}];
KillProcess[proc];
ProcessStatus[proc]
(* "Finished" *)Please visit the official Wolfram Language Reference for more details.