1AIO_CANCEL(3P) POSIX Programmer's Manual AIO_CANCEL(3P)
2
3
4
6 This manual page is part of the POSIX Programmer's Manual. The Linux
7 implementation of this interface may differ (consult the corresponding
8 Linux manual page for details of Linux behavior), or the interface may
9 not be implemented on Linux.
10
11
13 aio_cancel — cancel an asynchronous I/O request
14
16 #include <aio.h>
17
18 int aio_cancel(int fildes, struct aiocb *aiocbp);
19
21 The aio_cancel() function shall attempt to cancel one or more asynchro‐
22 nous I/O requests currently outstanding against file descriptor fildes.
23 The aiocbp argument points to the asynchronous I/O control block for a
24 particular request to be canceled. If aiocbp is NULL, then all out‐
25 standing cancelable asynchronous I/O requests against fildes shall be
26 canceled.
27
28 Normal asynchronous notification shall occur for asynchronous I/O oper‐
29 ations that are successfully canceled. If there are requests that can‐
30 not be canceled, then the normal asynchronous completion process shall
31 take place for those requests when they are completed.
32
33 For requested operations that are successfully canceled, the associated
34 error status shall be set to [ECANCELED] and the return status shall be
35 −1. For requested operations that are not successfully canceled, the
36 aiocbp shall not be modified by aio_cancel().
37
38 If aiocbp is not NULL, then if fildes does not have the same value as
39 the file descriptor with which the asynchronous operation was initi‐
40 ated, unspecified results occur.
41
42 Which operations are cancelable is implementation-defined.
43
45 The aio_cancel() function shall return the value AIO_CANCELED if the
46 requested operation(s) were canceled. The value AIO_NOTCANCELED shall
47 be returned if at least one of the requested operation(s) cannot be
48 canceled because it is in progress. In this case, the state of the
49 other operations, if any, referenced in the call to aio_cancel() is not
50 indicated by the return value of aio_cancel(). The application may
51 determine the state of affairs for these operations by using
52 aio_error(). The value AIO_ALLDONE is returned if all of the opera‐
53 tions have already completed. Otherwise, the function shall return −1
54 and set errno to indicate the error.
55
57 The aio_cancel() function shall fail if:
58
59 EBADF The fildes argument is not a valid file descriptor.
60
61 The following sections are informative.
62
64 None.
65
67 None.
68
70 None.
71
73 None.
74
76 aio_read(), aio_write()
77
78 The Base Definitions volume of POSIX.1‐2008, <aio.h>
79
81 Portions of this text are reprinted and reproduced in electronic form
82 from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
83 -- Portable Operating System Interface (POSIX), The Open Group Base
84 Specifications Issue 7, Copyright (C) 2013 by the Institute of Electri‐
85 cal and Electronics Engineers, Inc and The Open Group. (This is
86 POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
87 event of any discrepancy between this version and the original IEEE and
88 The Open Group Standard, the original IEEE and The Open Group Standard
89 is the referee document. The original Standard can be obtained online
90 at http://www.unix.org/online.html .
91
92 Any typographical or formatting errors that appear in this page are
93 most likely to have been introduced during the conversion of the source
94 files to man page format. To report such errors, see https://www.ker‐
95 nel.org/doc/man-pages/reporting_bugs.html .
96
97
98
99IEEE/The Open Group 2013 AIO_CANCEL(3P)