Penguin

Differences between current version and predecessor to the previous major change of readv(2).

Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History

Newer page: version 2 Last edited on Sunday, March 16, 2003 9:23:00 pm by PerryLorier
Older page: version 1 Last edited on Tuesday, June 4, 2002 12:23:44 am by perry Revert
@@ -1,135 +1,43 @@
-READV  
-!!!READV  
-NAME  
-SYNOPSIS  
-DESCRIPTION  
-RETURN VALUE  
-ERRORS  
-CONFORMING TO  
-SEE ALSO  
-----  
 !!NAME 
+readv, writev - read or write a vector  
  
-  
-readv, writev - read or write a vector  
 !!SYNOPSIS 
+ __#include <sys/uio.h>__  
  
+ __int readv(int__ ''fd''__, const struct iovec *__ ''vector''__, int__ ''count''__);__  
  
-__#include __ 
+ __int writev(int__ ''fd''__, const struct iovec *__ ''vector''__, int__ ''count''__); __ 
  
+ __struct iovec {__  
+ ptr_t__ ''iov_base''__;__ /* Starting address. */__  
+ size_t__ ''iov_len''__;__ /* Length in bytes. */__  
+ __};__  
  
-__int readv(int__ ''fd''__, const struct iovec *__  
-''vector''__, int__ ''count''__);__  
-  
-  
-__int writev(int__ ''fd''__, const struct iovec *__  
-''vector''__, int__ ''count''__);__  
-  
-  
-__struct iovec {  
-__ptr_t__ ''iov_base''__;__ /* Starting address.  
-*/__  
-size_t__ ''iov_len''__;__ /* Length in bytes.  
-*/__  
-};__  
 !!DESCRIPTION 
+readv(2) reads data from file descriptor ''fd'', and puts the result in the buffers described by ''vector''. The number of buffers is specified by ''count''. The  
+buffers are filled in the order specified. Operates just like __read__ except that data is put in ''vector'' instead of a contiguous buffer.  
  
+__writev__ writes data to file descriptor ''fd'', and from the buffers described by ''vector''. The number of buffers is specified by ''count''. The buffers are used  
+in the order specified. Operates just like __write__ except that data is taken from ''vector'' instead of a contiguous buffer.  
  
-__readv__ reads data from file descriptor ''fd'', and  
-puts the result in the buffers described by ''vector''.  
-The number of buffers is specified by ''count''. The  
-buffers are filled in the order specified. Operates just  
-like __read__ except that data is put in ''vector''  
-instead of a contiguous buffer.  
-  
-  
-__writev__ writes data to file descriptor ''fd'', and  
-from the buffers described by ''vector''. The number of  
-buffers is specified by ''count''. The buffers are used  
-in the order specified. Operates just like __write__  
-except that data is taken from ''vector'' instead of a  
-contiguous buffer.  
 !!RETURN VALUE 
+On success __readv__ returns the number of bytes read. On success __writev__ returns the number of bytes written. On error, -1 is returned, and ''errno'' is set appropriately.  
  
-  
-On success __readv__ returns the number of bytes read. On  
-success __writev__ returns the number of bytes written.  
-On error, -1 is returned, and ''errno'' is set  
-appropriately.  
 !!ERRORS 
+;[EINVAL]: An invalid argument was given. For instance ''count'' might be greater than __MAX_IOVEC__, or zero. ''fd'' could also be attached to an object which is unsuitable for reading (for __readv__) or writing (for __writev__).  
+;[EFAULT]: vector'' or some of the ''iov_base'' pointers points to memory that is not properly allocated.  
+;[EBADF]: The file descriptor ''fd'' is not valid.  
+;[EINTR]: The call was interrupted by a signal before any data was read/written.  
+;[EAGAIN]: Non-blocking I/O has been selected using __O_NONBLOCK__ and no data was immediately available for reading. (Or the file descriptor ''fd'' is for an object that is locked.)  
+;[EISDIR]: ''fd'' refers to a directory.  
+;[EOPNOTSUP]: ''fd'' refers to a socket or device that does not support reading/writing.  
+;[ENOMEM]: Insufficient kernel memory was available.  
  
+Other errors may occur, depending on the object connected to ''fd''.  
  
-__EINVAL__  
-  
-  
-An invalid argument was given. For instance ''count''  
-might be greater than __MAX_IOVEC__, or zero. ''fd''  
-could also be attached to an object which is unsuitable for  
-reading (for __readv__) or writing (for  
-__writev__).  
-  
-  
-__EFAULT__  
-  
-  
-vector'' or  
-some of the ''iov_base'' pointers points to memory that  
-is not properly allocated.  
-  
-  
-__EBADF__  
-  
-  
-The file descriptor ''fd'' is not valid.  
-  
-  
-__EINTR__  
-  
-  
-The call was interrupted by a signal before any data was  
-read/written.  
-  
-  
-__EAGAIN__  
-  
-  
-Non-blocking I/O has been selected using __O_NONBLOCK__  
-and no data was immediately available for reading. (Or the  
-file descriptor ''fd'' is for an object that is  
-locked.)  
-  
-  
-__EISDIR__  
-  
-  
-''fd'' refers to a directory.  
-  
-  
-__EOPNOTSUP__  
-  
-  
-''fd'' refers to a socket or device that does not support  
-reading/writing.  
-  
-  
-__ENOMEM__  
-  
-  
-Insufficient kernel memory was available.  
-  
-  
-Other errors may occur, depending on the object connected to  
-''fd''.  
 !!CONFORMING TO 
+4.4BSD (the __readv__ and __writev__ functions first appeared in BSD 4.2), Unix98. Linux libc5 uses __size_t__ as the type of the ''count'' parameter, which is logical  
+but non-standard.  
  
-  
-4.4BSD (the __readv__ and __writev__ functions first  
-appeared in BSD 4.2), Unix98. Linux libc5 uses __size_t__  
-as the type of the ''count'' parameter, which is logical  
-but non-standard.  
 !!SEE ALSO 
-  
-  
- read(2), write(2), fprintf(3),  
- fscanf(3)  
-----  
+read(2), write(2), fprintf(3), fscanf(3) 
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.