home *** CD-ROM | disk | FTP | other *** search
/ minnie.tuhs.org / unixen.tar / unixen / PDP-11 / Trees / V6 / usr / man / man2 / write.2 < prev   
Encoding:
Text File  |  1975-06-26  |  914 b   |  46 lines

  1. .th WRITE II 8/5/73
  2. .sh NAME
  3. write \*- write on a file
  4. .sh SYNOPSIS
  5. (write = 4.)
  6. .br
  7. (file descriptor in r0)
  8. .br
  9. .ft B
  10. sys  write; buffer; nbytes
  11. .s3
  12. write(fildes, buffer, nbytes)
  13. .br
  14. char *buffer;
  15. .ft R
  16. .sh DESCRIPTION
  17. A file descriptor is a word returned from a
  18. successful
  19. .it open,
  20. .it creat,
  21. .it dup,
  22. or
  23. .it pipe
  24. call.
  25. .s3
  26. .it Buffer
  27. is the address of
  28. .it nbytes
  29. contiguous
  30. bytes which are written on the output file.
  31. The number of characters actually written is returned (in r0).
  32. It should be regarded as an error
  33. if this is not the same as requested.
  34. .s3
  35. Writes which are multiples
  36. of 512 characters long and begin on a 512-byte boundary
  37. in the file
  38. are more efficient than any others.
  39. .sh "SEE ALSO"
  40. creat (II), open (II), pipe (II)
  41. .sh DIAGNOSTICS
  42. The error bit
  43. (c-bit) is set on an error: bad descriptor, buffer address, or
  44. count; physical I/O errors.
  45. From C, a returned value of \*-1 indicates an error.
  46.