pub unsafe extern "C" fn OH_Ability_KillChildProcess(
pid: i32,
) -> Ability_NativeChildProcessResultAvailable on crate features
api-12 and api-22 only.Expand description
Terminates a child process created by the current process.
**NOTE**:
Child processes created in SELF_FORK mode cannot be terminated.
§Arguments
pid- Process ID of the target child process to terminate.
§Returns
- Returns [
NCP_NO_ERROR] if the operation succeeds. Returns [NCP_ERR_SERVICE_ERROR] if system service error occurs, please try again later. Returns [NCP_ERR_INVALID_PID] if:
- The specified PID does not exist
- The PID is not a child process of the current process
- The PID is a SELF_FORK mode child process
For details, see [
Ability_NativeChildProcess_ErrCode].
Available since API-level: 22