Not all systems have flock(). This is was not really tetsed...