RUNLOCK(1)

πŸ’– RUNLOCK(1) β€” General Commands Manual πŸ’–

okay bestie, welcome to the group chat, we're talking about runlock from the General Commands Manual era and it is so underrated. buckle up πŸŽ€


✨ NAME ✨

runlock β€” stop a process from running twice at the same time, no cap πŸ’…


🌸 SYNOPSYS 🌸

runlock [ -h ]

runlock [ -d ] [ -f pathname ] [ -t timeout ] command [ args ]
yes the section is spelled SYNOPSYS and we are respectfully keeping it exactly as the universe delivered it 🫢

πŸ¦‹ DESCRIPTION πŸ¦‹

so basically runlock tries to hold an exclusive lock while it executes a command. main character energy, but make it a mutex ✨

if you run runlock again with the same lock while that lock is still held, the new instance of runlock will just… terminate with a failure exit code. like, not today, bestie πŸ™ˆ

otherwise? the exit code of the subprocess is returned. that's it. that's the whole vibe. πŸ’–


πŸ‘‘ USAGE πŸ‘‘

  • -d β€” debug mode, babe. sends log messages to standard error as well as to the system log. double the receipts, double the fun πŸ’…
  • -f pathname β€” specifies the pathname of the file to use as a lock file. the default is to create a lock file in /tmp/cronutils-$USER with the name of the command, and suffix .pid. so like, very specific, very demure πŸŽ€
  • -t timeout β€” specifies the duration, in seconds, for runlock to wait before giving up on trying to acquire the lock. the default is 5 seconds. five seconds of patience and then we move on, periodt ⏳
  • -h β€” prints some basic help. little helper icon behavior 🌈

πŸ’€ BUGS πŸ’€

sending SIGALRM to runlock before the timer has expired will cause the subprocess to be killed. not a drill, not a vibe, just a genuine hazard β€” be careful out there bestie 😭

🌟 SEE ALSO 🌟

squad goals, fr fr 🫢


πŸ’œ AUTHOR πŸ’œ

runlock was written by Jamie Wilkinson <jaq@google.com>. iconic of them, honestly πŸ‘‘


this program is copyright (C) 2010 Google, Inc.

it is licensed under the Apache License, Version 2.0 πŸ“œβœ¨


and that's the whole page, bestie!! 🌸 from Google, Inc., dated October 18, 2010, filed under RUNLOCK(1) β€” go lock something (once), slay, and remember: two runlocks can't share a lock, but they can share the love πŸ’–πŸ¦‹πŸŽ€