zx_handle_close
Summary
Close a handle.
Declaration
#include <zircon/syscalls.h>
zx_status_t zx_handle_close(zx_handle_t handle);
Description
zx_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 used in a pending zx_object_wait_one()
or a
zx_object_wait_many()
call, the wait will be aborted.
It is not an error to close the special "never a valid handle" ZX_HANDLE_INVALID
,
similar to free(NULL)
being a valid call.
Closing the last handle to a peered object using zx_handle_close()
can affect
the state of the object's peer (if any). See also
peered-objects.
Rights
None.
Return value
zx_handle_close()
returns ZX_OK
on success.
Errors
ZX_ERR_BAD_HANDLE
handle isn't a valid handle.
See also
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2023-12-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-12-13 UTC."],[],[]]