lseek returns the new offset, not 0
authorChristopher Dykes <cdykes@fb.com>
Thu, 25 Aug 2016 21:52:59 +0000 (14:52 -0700)
committerFacebook Github Bot 9 <facebook-github-bot-9-bot@fb.com>
Thu, 25 Aug 2016 21:53:36 +0000 (14:53 -0700)
commitff5c9335246b6b02bbe9435744722415423f348d
tree8e14175a28c1f7de9c7f640ebe82b32e50ac5642
parent19c6708bbcdc5e8f0241b567a1e55dd579d0304a
lseek returns the new offset, not 0

Summary:
With how this was written it would fail if the call to `lseek` failed, or if it succeeded, unless it was setting the length to 0, in which case it would succeed.
This makes it work right.

Reviewed By: yfeldblum

Differential Revision: D3773311

fbshipit-source-id: 3dc94502d0c4259f6f2766b4c0903c081d7c36ab
folly/portability/Unistd.cpp