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

DESCRIPTION

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

RETURN VALUE

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

ERRORS

41       EBADF  fd is not a valid file descriptor.
42

CONFORMING TO

44       POSIX.1-2001
45

SEE ALSO

47       aio_error(3), aio_fsync(3), aio_read(3), aio_return(3), aio_suspend(3),
48       aio_write(3)
49
50
51
52                                  2003-11-14                     AIO_CANCEL(3)
Impressum