fcancel - cancel an asynchronous I/O operation
#define _MINIX_SOURCE 1
int fcancel(int *fd, int operation)
Fcancel cancels an asynchronous I/O operation. The effect is similar to
receiving a signal during a blocking system call, with the exception that
fwait(2) has to be used to get the result of the operation, just like
normal asynchronous I/O operations.
The first argument to fcancel specifies the file descriptor and the
second argument (operation) specifies which operation should be canceled.
Operation takes one of three values defined in <fcntl.h>:
#define ASIO_READ 0
#define ASIO_WRITE 1
#define ASIO_IOCTL 2
They cancel respectively read, write and ioctl operations.
If fcancel is performed on a completed asynchronous I/O operation whose
status has not been reported by fwait then fcancel is a no-op.
fcancel returns 0 upon success and -1 upon failure.
fd does not refer to an open file descriptor
operation has an illegal value, or no asynchronous operation is in
progress for this file descriptor/operation combination
Philip Homburg (firstname.lastname@example.org)