write
ssize_t write(int fd,void *buffer,size_t count);
use
write count
bytes from buffer
to fd
return code
write
return the number of bytes written or -1 and set errno
if an error happend
EFAULT
buffer
point to outside of the addressable spaceEBADF
the specified file descriptor don’t exist , is not open or is not open for wrtingEISDIR
the specified file descriptor is a directory
NOTE : this error is normally impossible because theopen
syscall can’t open directory for wrutingEIO
io error