1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
3 .\" %%%LICENSE_START(GPLv2+_DOC_FULL)
4 .\" This is free documentation; you can redistribute it and/or
5 .\" modify it under the terms of the GNU General Public License as
6 .\" published by the Free Software Foundation; either version 2 of
7 .\" the License, or (at your option) any later version.
9 .\" The GNU General Public License's references to "object code"
10 .\" and "executables" are to be interpreted as the output of any
11 .\" document formatting or typesetting system, including
12 .\" intermediate and printed output.
14 .\" This manual is distributed in the hope that it will be useful,
15 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
16 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 .\" GNU General Public License for more details.
19 .\" You should have received a copy of the GNU General Public
20 .\" License along with this manual; if not, see
21 .\" <http://www.gnu.org/licenses/>.
24 .TH AIO_CANCEL 3 2021-03-22 "" "Linux Programmer's Manual"
26 aio_cancel \- cancel an outstanding asynchronous I/O request
31 .BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp );
33 Link with \fI\-lrt\fP.
38 function attempts to cancel outstanding asynchronous I/O requests
39 for the file descriptor
43 is NULL, all such requests are canceled.
44 Otherwise, only the request
45 described by the control block pointed to by
50 for a description of the
54 Normal asynchronous notification occurs for canceled requests (see
58 The request return status
60 is set to \-1, and the request error status
64 The control block of requests that cannot be canceled is not changed.
66 If the request could not be canceled,
67 then it will terminate in the usual way after performing the I/O operation.
70 will return the status
77 differs from the file descriptor with which the asynchronous operation
78 was initiated, unspecified results occur.
80 Which operations are cancelable is implementation-defined.
81 .\" FreeBSD: not those on raw disk devices.
85 function returns one of the following values:
88 All requests were successfully canceled.
92 requests specified was not canceled because it was in progress.
93 In this case, one may check the status of individual requests using
97 All requests had already been completed before the call.
101 The cause of the error can be found by inspecting
107 is not a valid file descriptor.
115 function is available since glibc 2.1.
117 For an explanation of the terms used in this section, see
125 Interface Attribute Value
128 T} Thread safety MT-Safe
134 POSIX.1-2001, POSIX.1-2008.