.\" fwait.2 .\" .\" Created: 7 July, 1994 by Philip Homburg .TH fcancel 2 .SH NAME fcancel \- cancel an asynchronous I/O operation .SH SYNOPSIS .nf .ft B #define _MINIX_SOURCE 1 #include #include int fcancel(int *\fIfd\fP, int \fIoperation\fP) .ft R .fi .SH DESCRIPTION .B Fcancel cancels an asynchronous I/O operation. The effect is similar to receiving a signal during a blocking system call, with the exception that .BR fwait (2) has to be used to get the result of the operation, just like normal asynchronous I/O operations. .PP The first argument to \fBfcancel\fP specifies the file descriptor and the second argument (\fIoperation\fP) specifies which operation should be canceled. .I Operation takes one of three values defined in \fB\fP: .PP .nf #define ASIO_READ 0 #define ASIO_WRITE 1 #define ASIO_IOCTL 2 .fi .PP They cancel respectively read, write and ioctl operations. .PP If \fBfcancel\fP is performed on a completed asynchronous I/O operation whose status has not been reported by \fBfwait\fP then \fBfcancel\fP is a no-op. .SH "RETURN VALUES" \fBfcancel\fR returns 0 upon success and -1 upon failure. .SH ERRORS .IP EBADF .I fd does not refer to an open file descriptor .IP EINVAL .I operation has an illegal value, or no asynchronous operation is in progress for this file descriptor/operation combination .SH "SEE ALSO" .BR fwait (2). .SH AUTHOR Philip Homburg (philip@cs.vu.nl) .\" .\" $PchId: fcancel.2,v 1.3 1995/11/27 19:39:26 philip Exp $