Shell: The `flock` utility manages locks in scripts; C programming: flock() applies or removes an advisory lock on an open file.