Arquivos
Mark Seaborn 820c0c5585 [utest][threads] Add test for the case where a thread kills itself
This checks that mx_task_kill() does not return in this case.  Also
document that behaviour.  Previously, we didn't have any tests where
mx_task_kill() is called with a handle for the current thread.

This is a good way to test that the kernel's syscall implementation
checks THREAD_SIGNAL_KILL on the way out of the syscall.

Change-Id: If0d3c2eced82817de758d91a4520b2482929a715
2017-06-16 05:38:08 +00:00

424 B

mx_task_kill

NAME

task_kill - Kill the provided task.

SYNOPSIS

#include <magenta/syscalls.h>

mx_status_t mx_task_kill(mx_handle_t handle);

DESCRIPTION

This kills the given process, thread or job.

If a process or thread uses this syscall to kill itself, this syscall does not return.

RETURN VALUE

ERRORS

MX_ERR_ACCESS_DENIED handle does not have MX_RIGHT_DESTROY.

SEE ALSO