1AIO_CANCEL(3)              Linux Programmer's Manual             AIO_CANCEL(3)
2
3
4

NAME

6       aio_cancel - cancel an outstanding asynchronous I/O request
7

SYNOPSIS

9       #include <aio.h>
10
11       int aio_cancel(int fd, struct aiocb *aiocbp);
12
13       Link with -lrt.
14

DESCRIPTION

16       The  aio_cancel()  function attempts to cancel outstanding asynchronous
17       I/O requests for the file descriptor fd.  If aiocbp is NULL,  all  such
18       requests  are  canceled.   Otherwise, only the request described by the
19       control block pointed to by aiocbp is canceled.
20
21       Normal asynchronous notification occurs  for  canceled  requests.   The
22       request return status is set to -1, and the request error status is set
23       to ECANCELED.  The control block of requests that cannot be canceled is
24       not changed.
25
26       If  aiocbp  is  not  NULL, and fd differs from the file descriptor with
27       which the asynchronous operation  was  initiated,  unspecified  results
28       occur.
29
30       Which operations are cancellable is implementation-defined.
31

RETURN VALUE

33       This  function  returns  AIO_CANCELED if all requests were successfully
34       canceled.  It returns AIO_NOTCANCELED when at least one of the requests
35       specified  was  not  canceled because it was in progress.  In this case
36       one may check the status of  individual  requests  using  aio_error(3).
37       This  function returns AIO_ALLDONE when all requests had been completed
38       already before this call.  When some error occurs, -1 is returned,  and
39       errno is set appropriately.
40

ERRORS

42       EBADF  fd is not a valid file descriptor.
43

CONFORMING TO

45       POSIX.1-2001.
46

SEE ALSO

48       aio_error(3), aio_fsync(3), aio_read(3), aio_return(3), aio_suspend(3),
49       aio_write(3)
50

COLOPHON

52       This page is part of release 3.25 of the Linux  man-pages  project.   A
53       description  of  the project, and information about reporting bugs, can
54       be found at http://www.kernel.org/doc/man-pages/.
55
56
57
58                                  2003-11-14                     AIO_CANCEL(3)
Impressum