Defined in carb/launcher/ILauncher.h

enum class carb::launcher::KillStatus

Return statuses for ILauncher::killProcessWithTimeout().

These indicate how the termination attempt completed.


enumerator eSuccess

The child process was successfully terminated.

It will also have been confirmed to have exited fully if the fKillFlagSkipWait flag was not used. If the fKillFlagSkipWait flag is used in the call, this status only indicates that the signal to terminate the child process was successfully sent. The child process will exit at some point in the near future. If a very short timeout was used in a call to ILauncher::killProcessWithTimeout(), and the child process had exited within that period, this will be returned, otherwise KillStatus::eWaitFailed will be returned. In most situations, the time period between termination and when the child process fully exits will only be a few milliseconds. However, within that time period, calls to functions such as ILauncher::isProcessActive() or ILauncher::getProcessExitCode() may return false results.

enumerator eDebuggerAttached

A debugger was attached to the child process at the time the termination attempt was made.

This will only be returned if the fKillFlagFailOnDebugger flag is used and a debugger is attached to the child process. No attempt to terminate the process will be made in this case. A future call to ILauncher::killProcess() or ILauncher::killProcessWithTimeout() (once the debugger has been detached) will be needed to actually terminate the child process.

enumerator eDebuggerFail

A debugger was attached to the child process and that prevented it from being terminated.

This will only be returned on Windows. A similar situation can still occur on Linux, except that on Linux the child process will be terminated successfully. In that case, the debugger process will just be left in an invalid state where the only course of action is to detach from the terminated process. Note that when this value is returned, the child process will be marked for termination by the system, but it will not actually be terminated until the debugger is detached from it.

enumerator eTerminateFailed

The attempt to signal the child process to terminate failed.

This can occur if the child process’ handle is invalid or there is a permission problem. This will not happen in most common situations.

enumerator eWaitFailed

Waiting for the child process to exit failed or timed out.

When this is returned, the child process has still been successfully signaled to exit, but it didn’t fully exit before the timeout expired. This may still be viewed as a successful result however. This status code can be suppressed in successful cases with the fKillFlagSkipWait flag. That flag is especially useful when a zero timeout is desired but a successful result should still be returned. If this value is returned, the caller is responsible for ensuring the child process successfully exits. This state can be verified with calls such as ILauncher::isProcessActive(), ILauncher::getProcessExitCode(), and ILauncher::waitProcessExit().

enumerator eInvalidParameter

An invalid parameter was passed into ILauncher::killProcessWithTimeout().