fcntl lock implementation

it's just a brief scatch. I didn't test it. I'm alos not sure that
I properly packed the structure.