killPid method

bool killPid(int pid, [ ProcessSignal signal = ProcessSignal.SIGTERM ])

Kills the process with id pid.

Where possible, sends the signal to the process with id pid. This includes Linux and OS X. The default signal is ProcessSignal.SIGTERM which will normally terminate the process.

On platforms without signal support, including Windows, the call just terminates the process with id pid in a platform specific way, and the signal parameter is ignored.

Returns true if the signal is successfully delivered to the process. Otherwise the signal could not be sent, usually meaning that the process is already dead.

Source

external static bool killPid(int pid,
    [ProcessSignal signal = ProcessSignal.SIGTERM]);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/1.24.3/dart-io/Process/killPid.html