Because negative offsets are possible, we should be careful to compare the return value from
lseek as being equal to or not equal to –1, rather than testing whether it is less than 0.
- 3. File I/O
- from Advanced Programming in the UNIX® Environment, Third Edition
- Publisher: Addison-Wesley Professional
- Released: May 2013
So what if the offset is -1?
Share this highlighthttp://www.safaribooksonline.com/a/advanced-programming-in/12497/