1 .\" Copyright (c) 2003 Andries Brouwer (aeb@cwi.nl)
3 .\" This is free documentation; you can redistribute it and/or
4 .\" modify it under the terms of the GNU General Public License as
5 .\" published by the Free Software Foundation; either version 2 of
6 .\" the License, or (at your option) any later version.
8 .\" The GNU General Public License's references to "object code"
9 .\" and "executables" are to be interpreted as the output of any
10 .\" document formatting or typesetting system, including
11 .\" intermediate and printed output.
13 .\" This manual is distributed in the hope that it will be useful,
14 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
15 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 .\" GNU General Public License for more details.
18 .\" You should have received a copy of the GNU General Public
19 .\" License along with this manual; if not, write to the Free
20 .\" Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111,
23 .TH AIO_CANCEL 3 2012-04-18 "" "Linux Programmer's Manual"
25 aio_cancel \- cancel an outstanding asynchronous I/O request
29 .BI "int aio_cancel(int " fd ", struct aiocb *" aiocbp );
31 Link with \fI\-lrt\fP.
35 function attempts to cancel outstanding asynchronous I/O requests
36 for the file descriptor
40 is NULL, all such requests are canceled.
41 Otherwise, only the request
42 described by the control block pointed to by
47 for a description of the
51 Normal asynchronous notification occurs for canceled requests.
52 The request return status
54 is set to \-1, and the request error status
58 The control block of requests that cannot be canceled is not changed.
64 differs from the file descriptor with which the asynchronous operation
65 was initiated, unspecified results occur.
67 Which operations are cancelable is implementation-defined.
68 .\" FreeBSD: not those on raw disk devices.
72 function returns one of the following values:
75 All requests were successfully canceled.
79 requests specified was not canceled because it was in progress.
80 In this case, one may check the status of individual requests using
84 All requests had already been completed before the call.
88 The cause of the error can be found by inspecting
94 is not a valid file descriptor.
98 function is available since glibc 2.1.
100 POSIX.1-2001, POSIX.1-2008.