From 3947ef7790eba735b6d56a6f0a88b1dff39e89dd Mon Sep 17 00:00:00 2001 From: VG Date: Thu, 21 Apr 2016 23:21:11 +0200 Subject: Auto-commit on 807fe7afb37fe2cfcf15c9457d04f64fa11b7511 --- readme.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'readme.rst') diff --git a/readme.rst b/readme.rst index 3db9dd7..9d2ebaa 100644 --- a/readme.rst +++ b/readme.rst @@ -72,7 +72,8 @@ able to be interruptible without interrupting the underlying job. .. code:: shell #!/bin/sh - flock -x /var/lock/transcode_my_file.sh.lock ffmpeg -i "$1" -arg -arg & + [ "${FLOCKER}" != "$0" ] && exec env FLOCKER="$0" flock -e "$0" "$@" + ffmpeg -i "$1" -arg -arg & The first `ffmpeg` command will go to background then, the second will wait until the first `ffmpeg` finishes. If the `teaqueue` command is interrupted, -- cgit v1.2.3