1AIO_CANCEL(3P)             POSIX Programmer's Manual            AIO_CANCEL(3P)
2
3
4

PROLOG

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

NAME

12       aio_cancel — cancel an asynchronous I/O request
13

SYNOPSIS

15       #include <aio.h>
16
17       int aio_cancel(int fildes, struct aiocb *aiocbp);
18

DESCRIPTION

20       The aio_cancel() function shall attempt to cancel one or more asynchro‐
21       nous I/O requests currently outstanding against file descriptor fildes.
22       The aiocbp argument points to the asynchronous I/O control block for  a
23       particular  request  to  be  canceled. If aiocbp is NULL, then all out‐
24       standing cancelable asynchronous I/O requests against fildes  shall  be
25       canceled.
26
27       Normal asynchronous notification shall occur for asynchronous I/O oper‐
28       ations that are successfully canceled. If there are requests that  can‐
29       not  be canceled, then the normal asynchronous completion process shall
30       take place for those requests when they are completed.
31
32       For requested operations that are successfully canceled, the associated
33       error status shall be set to [ECANCELED] and the return status shall be
34       -1. For requested operations that are not  successfully  canceled,  the
35       aiocbp shall not be modified by aio_cancel().
36
37       If  aiocbp  is not NULL, then if fildes does not have the same value as
38       the file descriptor with which the asynchronous  operation  was  initi‐
39       ated, unspecified results occur.
40
41       Which operations are cancelable is implementation-defined.
42

RETURN VALUE

44       The  aio_cancel()  function  shall return the value AIO_CANCELED if the
45       requested operation(s) were canceled.  The value AIO_NOTCANCELED  shall
46       be  returned  if  at  least one of the requested operation(s) cannot be
47       canceled because it is in progress. In this  case,  the  state  of  the
48       other operations, if any, referenced in the call to aio_cancel() is not
49       indicated by the return value of  aio_cancel().   The  application  may
50       determine   the   state  of  affairs  for  these  operations  by  using
51       aio_error().  The value AIO_ALLDONE is returned if all  of  the  opera‐
52       tions  have already completed.  Otherwise, the function shall return -1
53       and set errno to indicate the error.
54

ERRORS

56       The aio_cancel() function shall fail if:
57
58       EBADF  The fildes argument is not a valid file descriptor.
59
60       The following sections are informative.
61

EXAMPLES

63       None.
64

APPLICATION USAGE

66       None.
67

RATIONALE

69       None.
70

FUTURE DIRECTIONS

72       None.
73

SEE ALSO

75       aio_read(), aio_write()
76
77       The Base Definitions volume of POSIX.1‐2017, <aio.h>
78
80       Portions of this text are reprinted and reproduced in  electronic  form
81       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
82       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
83       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
84       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
85       event of any discrepancy between this version and the original IEEE and
86       The Open Group Standard, the original IEEE and The Open Group  Standard
87       is  the  referee document. The original Standard can be obtained online
88       at http://www.opengroup.org/unix/online.html .
89
90       Any typographical or formatting errors that appear  in  this  page  are
91       most likely to have been introduced during the conversion of the source
92       files to man page format. To report such errors,  see  https://www.ker
93       nel.org/doc/man-pages/reporting_bugs.html .
94
95
96
97IEEE/The Open Group                  2017                       AIO_CANCEL(3P)
Impressum