If a brash script, or a brash command line that you are typing in from the console hangs, and will not respond to control-C, you will likely have to kill the console window that it is running in.
This is almost always results from very many pipe members in a pipe statements.
Brash is a threaded application with a fixed size thread command pool. The size can be controlled in 2 ways: the command line option -threads threadCount set the environment variable BRASH_THREAD_COUNT before starting brash
The default number of threads is 20. Though this may change over time.
If you realize that you have a script that will always need to be run with more than the default number of threads, you can put this at the top of your script:
if["$BRASH_THREAD_COUNT"-lt40]then## if an insufficient number of threads is currently available,# based on the complexity needs of this script (ie the pipe depth)# then reinvoke brash with more threads and rerun the script.#cmdline="$0"forfin"$@";docmdline="$cmdline '$f'";donebrash-threads40-c"$cmdline"exit$?fi
In this example, the needed number of threads is 40. due to other statements in this script. The above code, at the top of the script, simply re-invokes the same script in a new brash instance but with the needed number of threads.
If a permanent increase in the size of the thread pool is desired, set the BRASH_THREAD_COUNT variable in the windows invironment before invoking brash. See
Start Button
Control Panel
system and security
system
Advance system settings
environment variables
user variables
Last edit: Lowell Boggs, Jr. 2016-06-07
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If a brash script, or a brash command line that you are typing in from the console hangs, and will not respond to control-C, you will likely have to kill the console window that it is running in.
This is almost always results from very many pipe members in a pipe statements.
Brash is a threaded application with a fixed size thread command pool. The size can be controlled in 2 ways:
the command line option -threads threadCount
set the environment variable BRASH_THREAD_COUNT before starting brash
The default number of threads is 20. Though this may change over time.
If you realize that you have a script that will always need to be run with more than the default number of threads, you can put this at the top of your script:
In this example, the needed number of threads is 40. due to other statements in this script. The above code, at the top of the script, simply re-invokes the same script in a new brash instance but with the needed number of threads.
If a permanent increase in the size of the thread pool is desired, set the BRASH_THREAD_COUNT variable in the windows invironment before invoking brash. See
Last edit: Lowell Boggs, Jr. 2016-06-07