Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
WRITE.2
Upload User: jnzhq888
Upload Date: 2007-01-18
Package Size: 51694k
Code Size: 3k
Category:
OS Develop
Development Platform:
WINDOWS
- WRITE(2) Minix Programmer's Manual WRITE(2)
- NAME
- write - write output
- SYNOPSIS
- #include <sys/types.h>
- #include <unistd.h>
- ssize_t write(int d, const void *buf, size_t nbytes)
- DESCRIPTION
- Write attempts to write nbytes of data to the object referenced by the
- descriptor d from the buffer pointed to by buf.
- On objects capable of seeking, the write starts at a position given by
- the pointer associated with d, see lseek(2). Upon return from write, the
- pointer is incremented by the number of bytes actually written.
- Objects that are not capable of seeking always write from the current
- position. The value of the pointer associated with such an object is
- undefined.
- When using non-blocking I/O on objects such as TCP/IP channels that are
- subject to flow control, write may write fewer bytes than requested; the
- return value must be noted, and the remainder of the operation should be
- retried when possible.
- RETURN VALUE
- Upon successful completion the number of bytes actually written is
- returned. Otherwise a -1 is returned and the global variable errno is
- set to indicate the error.
- ERRORS
- Write will fail and the file pointer will remain unchanged if one or more
- of the following are true:
- [EBADF] D is not a valid descriptor open for writing.
- [EPIPE] An attempt is made to write to a pipe that is not open for
- reading by any process.
- [EPIPE] An attempt is made to write to a TCP channel that is not
- connected to a peer socket.
- [EFBIG] An attempt was made to write a file that exceeds the
- process's file size limit or the maximum file size.
- [EFAULT] Part of the data to be written to the file points outside
- the process's allocated address space.
- 4BSD May 14, 1986 1
- WRITE(2) Minix Programmer's Manual WRITE(2)
- [ENOSPC] There is no free space remaining on the file system
- containing the file.
- [EIO] An I/O error occurred while reading from or writing to the
- file system.
- [EAGAIN] The file was marked for non-blocking I/O, and no data
- could be written immediately.
- SEE ALSO
- fcntl(2), lseek(2), open(2), pipe(2), read(2).
- 4BSD May 14, 1986 2