Flock(1) asserts/waits for/removes advisory locks on existing descriptors (not just pathnames like lockf(1)), and can be used to sync with other processes using flock(2).