Skip to content

TaskKill

Terminates another task, as if it had called Quit(ERR_DEAD).

Number Selector Blocking Since
0x0C SVC_MANAGETASK MNGTASK_KILL (1) no 2.0
Err TaskKill(Handle h);

Registers: (task) -> r0 status

Killing a faulted task also unfreezes its space. Killing a task that has already exited succeeds and does nothing.

Parameters

Name Direction Description
h in Task handle with PERM_CNTL.

Returns

ZUZU_OK, or an error code.

Errors

Error Condition
ERR_BADHANDLE h is not a live handle.
ERR_BADTYPE h is not a task.
ERR_NOPERM h lacks PERM_CNTL.
ERR_BADARG h is the caller itself or -1; use Quit() to end yourself.