drothlis/stb-tester — pull request #28 by drothlis (2013-05-29 17:39:15+00:00)
Title: Add lock to prevent multiple instances of `stbt run` at the same time

`stbt run`, `stbt record`, `stbt screenshot`, and `stbt tv` require
access to the video-capture hardware, so they can't be run at the same
time. The lock is held on $STBT_CONFIG_FILE; this assumes that each
different $STBT_CONFIG_FILE has a `source_pipeline` specifying a
different video-capture card. If you don't have a $STBT_CONFIG_FILE or
~/.config/stbt/stbt.conf, or if your system doesn't have `flock`, then
no locking is done.