More info on the
read() syscall in C:
Name: |
System call or function: System call | Links: Online Manual | Course Packet |
| What it does: reads data from a file into an array, and returns the # of read bytes. | ||
What libraries you must include: |
||
Syntax: |
||
Description of arguments: : file descriptor of an open file |
||
What type it returns: |
On success: A non-negative integer indicating how many bytes we read in. This number will be equal to or smaller than , and could also be (end-of-file case.) |
|
On failure: |
||
Quick example: |
||