[hack] Circumvent `Unix.lockf` different behaviour on Windows.
[hack] Circumvent `Unix.lockf` different behaviour on Windows.

Summary: On Windows, F_TLOCK and F_TEST fails if we have the lock ourself
However, we then are the only one to be able to write there.
Closes https://github.com/facebook/hhvm/pull/5904

Reviewed By: @sgolemon

Differential Revision: D2332765

Pulled By: @jwatzman

gabelevi/flow,d14b3l/flow,siddhartharay007/flow,AgentME/flow,KevinTCoughlin/flow,jdelStrother/flow,CJstar/flow,AprilArcus/flow,paulshen/flow,jeffutter/flow,ylu1317/flow,cesarandreu/flow,popham/flow,facebook/flow,mroch/flow,jeffutter/flow,KevinTCoughlin/flow,facebook/flow,mroch/flow,facebook/flow,samwgoldman/flow,AprilArcus/flow,gabelevi/flow,facebook/flow,Wanderfalke/flow,chenglou/flow,JohnyDays/flow,ForbesLindesay/flow,jamesgpearce/flow,chenglou/flow,AprilArcus/flow,chenglou/flow,jdelStrother/flow,ForbesLindesay/flow,chenglou/flow,popham/flow,jamesgpearce/flow,ianobermiller/flow,TiddoLangerak/flow,facebook/flow,jgrund/flow,CJstar/flow,jdelStrother/flow,AgentME/flow,ylu1317/flow,jeffmo/flow,fletcherw/flow,popham/flow,CJstar/flow,chenglou/flow,lyip1992/flow,shiftcars/flow,siddhartharay007/flow,MichaelDeBoey/flow,jeffutter/flow,OCamlPro/flow,gabelevi/flow,gabro/flow,ForbesLindesay/flow,asivitz/flow,d14b3l/flow,gabelevi/flow,chenglou/flow,gabro/flow,jdelStrother/flow,graue/flow,AgentME/flow,popham/flow,gabro/flow,JohnyDays/flow,JonathanUsername/flow,Eyyub/flow,jamesgpearce/flow,shiftcars/flow,gabelevi/flow,JohnyDays/flow,gabro/flow,TiddoLangerak/flow,jdelStrother/flow,jgrund/flow,graue/flow,ForbesLindesay/flow,samwgoldman/flow,Drooids/flow,danvk/flow,fletcherw/flow,graue/flow,Drooids/flow,claudiopro/flow,CJstar/flow,nmote/flow,jgrund/flow,fletcherw/flow,TiddoLangerak/flow,ForbesLindesay/flow,jeffutter/flow,MichaelDeBoey/flow,nmote/flow,gabelevi/flow,TiddoLangerak/flow,Eyyub/flow,shiftcars/flow,Fresheyeball/flow,nmote/flow,d14b3l/flow,MichaelDeBoey/flow,cesarandreu/flow,Drooids/flow,asivitz/flow,Fresheyeball/flow,lyip1992/flow,jamesgpearce/flow,AprilArcus/flow,asivitz/flow,JonathanUsername/flow,AprilArcus/flow,jamesgpearce/flow,dv/flow,AgentME/flow,facebook/flow,ianobermiller/flow,KevinTCoughlin/flow,fletcherw/flow,gabelevi/flow,JonathanUsername/flow,Fresheyeball/flow,jeffmo/flow,samwgoldman/flow,ianobermiller/flow,paulshen/flow,Wanderfalke/flow,claudiopro/flow,paulshen/flow,graue/flow,mcanthony/flow-type,samwgoldman/flow,jamesgpearce/flow,MichaelDeBoey/flow,nmote/flow,AgentME/flow,Wanderfalke/flow,ylu1317/flow,OCamlPro/flow,jgrund/flow,mroch/flow,OCamlPro/flow,mcanthony/flow-type,JonathanUsername/flow,mroch/flow,darioajr/flow,JonathanUsername/flow,danvk/flow,shiftcars/flow,jgrund/flow,samwgoldman/flow,cesarandreu/flow,paulshen/flow,darioajr/flow,popham/flow,Eyyub/flow,JohnyDays/flow,dv/flow,fletcherw/flow,mroch/flow,mcanthony/flow-type,claudiopro/flow,JonathanUsername/flow,gabro/flow,mroch/flow,dv/flow,Fresheyeball/flow,jeffmo/flow,lyip1992/flow,ylu1317/flow,nmote/flow,fletcherw/flow,popham/flow,nmote/flow,darioajr/flow,gabro/flow,ylu1317/flow,facebook/flow,asivitz/flow,jdelStrother/flow,siddhartharay007/flow,Drooids/flow,graue/flow,samwgoldman/flow,danvk/flow,popham/flow,lyip1992/flow,jgrund/flow,TiddoLangerak/flow,KevinTCoughlin/flow,Wanderfalke/flow,AprilArcus/flow,mroch/flow,cesarandreu/flow,ianobermiller/flow,Eyyub/flow,JonathanUsername/flow,graue/flow,claudiopro/flow,claudiopro/flow,shiftcars/flow,siddhartharay007/flow,danvk/flow,dv/flow,darioajr/flow,OCamlPro/flow,d14b3l/flow,d14b3l/flow,samwgoldman/flow,jamesgpearce/flow,jeffmo/flow,ForbesLindesay/flow,jeffmo/flow,mcanthony/flow-type,MichaelDeBoey/flow,d14b3l/flow,nmote/flow,shiftcars/flow,jeffmo/flow