X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Fprocesses%2Fprocess_manager.sh;h=548f2593e083168f648c27f998792b59710a4dfa;hb=2ce3769d78d139d8dfa0361eb0b62f8b6e6b1115;hp=8acab83e241b49c61c6b5f0b84d1d5e72dac8007;hpb=3cf62ca8a11db0d1e89a3f5ed39919c75f447e84;p=feisty_meow.git diff --git a/scripts/processes/process_manager.sh b/scripts/processes/process_manager.sh index 8acab83e..548f2593 100644 --- a/scripts/processes/process_manager.sh +++ b/scripts/processes/process_manager.sh @@ -1,13 +1,23 @@ #!/bin/bash -# process manager helper methods for bash. +############## # -# relies on the built-in process management to run a bunch of processes -# in the background, but will limit total number running to a maximum. -# demonstration method at the end of the file shows how to use the -# process managing methods. +# Name : process manager helper methods +# Author : Chris Koeritz +# Rights : Copyright (C) 2015-$now by Author # -# by chris koeritz +# Purpose: +# +# Relies on the built-in process management in bash to run a bunch of +# processes in the background, but will limit total number running to a +# maximum count. There is a demonstration method at the end of the file +# that shows how to use the process management functions. +# +############## +# This script is free software; you can modify/redistribute it under the terms +# of the GNU General Public License. [ http://www.gnu.org/licenses/gpl.html ] +# Feel free to send updates to: [ fred@gruntose.com ] +############## #hmmm: revisions desired someday: # + allow number of max processes to be passed in. @@ -45,7 +55,7 @@ function nechung() '$BINDIR/nechung' } -function login_on_xcg() +function sum_dir() { start_background_action \ 'echo "summing directory output coming up..."' \ @@ -80,7 +90,7 @@ launcher_demonstrator() case $which in 0) take_inventory;; 1) nechung;; - 2) login_on_xcg;; + 2) sum_dir;; esac # we have reached the limit on processes and need to wait for a few, defined by