handle_close - close a handle
#include <magenta/syscalls.h> mx_status_t mx_handle_close(mx_handle_t handle);
handle_close() closes a handle, causing the underlying object to be reclaimed by the kernel if no other handles to it exist.
If the handle was the next to last handle to the object. The last handle to the object will assert the MX_SIGNAL_LAST_HANDLE signal.
It is not an error to close the special “never a valid handle” MX_HANDLE_INVALID, similar to free(NULL) being a valid call.
handle_close() returns MX_OK on success.
MX_ERR_BAD_HANDLE handle isn't a valid handle.