Assert/wait for advisory locks with flock(2)