Unit 'process' Package
[Overview][Resource strings][Types][Classes][Procedures and functions][Variables][Index] [#fcl]

TProcess.Terminate

Terminate a running process.

Declaration

Source position: processbody.inc line 194

public function TProcess.Terminate(

  AExitCode: Integer

):Boolean; virtual;

Arguments

AExitCode

  

Exit status to report (Windows only).

Function result

0 on success, nonzero for failure.

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

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.


Documentation generated on: Dec 27 2024