Skip to content

TProcess.Terminate

Terminate a running process.

Declaration

Source position: processbody.inc line 195

public 
function TProcess.Terminate(AExitCode: Integer) : Boolean;  virtual;

Description

Terminate stops the execution of the running program. It effectively stops the program.

On Windows, the program will report an exit code of AExitCode, on other systems, this value is ignored.

Errors

On error, a nonzero value is returned.

See also

Name Description
TProcess.ExitStatus Exit status of the process.
TProcess.Suspend Suspend a running process.
TProcess.Execute Execute the program with the given options.
TProcess.WaitOnExit Wait for the program to stop executing.
TProcess.ExitCode Exit code of the process.