script hanging???

ok... this is where i am at... i need a script to call another script as a wrapper because the first script creates a sub-shell.

here is what i got... i kick off the first script "CCBDEMO-threadpoolworker.sh"

#!/bin/bash

clear #clearing screen

directory="/data1/spl/cis/CCBDEMO/bin"
startenviron="splenviron.sh -e CCBDEMO -c threadworkerstart.sh"

cd $directory
$startenviron
exit

as you can see... that is pretty self explanitory... i am kicking off a script called splenviron.sh that basically sets all the environment variables for the instance of CCBDEMO for Oracle's CC&B application. then once it does that it kicks off another shell script that actuall sends the command to start the threadpoolworker for batch-processing...

threadworkerstart.sh:

#!/bin/bash

directory="/data1/spl/cis/CCBDEMO/bin"
tpws="nohup threadpoolworker.sh -p DEFAULT=5 -d Y >/dev/null &"

cd $directory
$tpws

echo "**********************************************"
echo "** START OF THREADPOOLWORKER HAS COMPLETED. **"
echo "** PLEASE TYPE EXIT TO REMOVE YOURSELF FROM **"
echo "** THE CURRENT ENVIRONMENT SETTINGS.        **"
echo "**********************************************"

what this is supposed to do, is start up the batchprocessing threadpools... in the background, so that i don't need to keep a terminal (putty session) open all the time... well it all works until i get to the nohup part... it actually does kick off the threadpool, and starts sending everything to the nohup.out, but it will not give me my prompt back unless i kill it... here is the output from the start of the first shell script, to the hang...

 /data1/spl/cis/CCBDEMO/bin> CCBDEMO-threadpoolstarter.sh
Java version = 1.5.0
Java vendor = IBM Corporation
Java OS name = AIX
Java OS arch = ppc
Java OS version = 5.3
BEADIR=/opt/bea
Version ................ (SPLVERSION) : V2.1.0
Database Type ............... (SPLDB) : oracle
ORACLE_SID ............. (ORACLE_SID) : CCBDEMO
NLS_LANG ................. (NLS_LANG) : AMERICAN_AMERICA.UTF8
Environment Name ....... (SPLENVIRON) : CCBDEMO
Environment Code Directory (SPLEBASE) : /data1/spl/cis/CCBDEMO
App Output Dir - Logs ... (SPLOUTPUT) : /data1/spl/sploutput/CCBDEMO
Build Directory .......... (SPLBUILD) : /data1/spl/cis/CCBDEMO/cobol/build
Runtime Directory .......... (SPLRUN) : /data1/spl/cis/CCBDEMO/runtime
Sending output to nohup.out
Build Directory .......... (SPLBUILD) : /data1/spl/cis/CCBDEMO/cobol/build
Runtime Directory .......... (SPLRUN) : /data1/spl/cis/CCBDEMO/runtime
Sending output to nohup.out

at this point it just hangs... doesn't give me a prompt back, nothing... until i hit CTRL+C... then it completes with the "echo" commands and then back to the first script and does the exit as requested...

am i doing something wrong in my code?

figured it out....

in the second script i had:

the "nohup" was inside the string variable....

i moved the nohup to the outside of the string variable, and all worked out....