long lseek (int fd, long offset, int flag);
flag is one of:
- The offset is set to offset bytes.
- The offset is set to its current location plus offset
- The offset is set to the size of the file plus offset bytes.
- Return value:
- On success, the resulting unsigned offset in bytes from
the beginning of the file is returned. Otherwise, a
value of -1 is returned.
- fd is not a valid open file descriptor.
- fd is associated with the gdb console.
- flag is not a proper value.
- The call was interrupted by the user.