/usr/sbin/postlock
The postlock command locks file for exclusive access, and executes command. The locking method is compatible with the Postfix UNIX-style local delivery agent.