.\" Copyright, the authors of the Linux man-pages project .\" .\" SPDX-License-Identifier: GPL-3.0-or-later .\" .TH io_destroy 3 2026-04-11 "Linux man-pages 6.18" .SH NAME io_destroy \- destroy an asynchronous I/O context .SH LIBRARY Asynchronous I/O library .RI ( libaio ,\~ \-laio ) .SH SYNOPSIS .nf .B #include .P .BI long\~io_destroy(io_context_t\~* ctx_idp ); .fi .SH DESCRIPTION The .BR io_destroy () system call will attempt to cancel all outstanding asynchronous I/O operations against .IR ctx_id , will block on the completion of all operations that could not be canceled, and will destroy the .IR ctx_id . .SH RETURN VALUE On success, .BR io_destroy () returns 0. On error, a negative error code is returned to indicate the error. .SH ERRORS See .BR io_destroy (2). .SH STANDARDS libaio. .SH HISTORY libaio. .SH SEE ALSO .BR io_destroy (2), .BR io (3), .BR aio (7)