From c03d107bac810e663357e7d703a43f30ca0d376e Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Sat, 10 Nov 2012 14:09:26 +0530 Subject: [PATCH] help run some trigger programs in the background --- src/triggers/bg | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 src/triggers/bg diff --git a/src/triggers/bg b/src/triggers/bg new file mode 100755 index 0000000..3c66500 --- /dev/null +++ b/src/triggers/bg @@ -0,0 +1,17 @@ +#!/bin/bash + +# quick and dirty program to background any of the triggers programs that are +# taking too long. To use, just replace a line like +# 'post-compile/update-gitweb-access-list', +# with +# 'bg post-compile/update-gitweb-access-list', + +# We dump output to a file in the log directory but please keep in mind this +# is not a "log" so much as a redirection of the entire output. + +echo `date` $GL_TID "$0: $@" >> $GL_LOGFILE.bg + +path=${0%/*} +script=$path/$1; shift + +( ( $script "$@" < /dev/null >> $GL_LOGFILE.bg 2>&1 & ) )