Value of variable not getting passed in child script

Hi,
I am facing a challenge in fixing an issue in my installation scripts.Here is a situation:
There are 3 files which are invoked at a below given order:
Installer.ksh----->Installer.xml(Ant script)------->common.ksh
I am outputting a message from common.ksh at a terminal, after that trying to read a variable. Problem is that value of a variable is not coming in common.ksh.
Here is my code used in common.ksh:
print "Do you want to continue (y/n) ? " | tee -a /dev/tty
read answer
if [[ "$answer" = "y" || "$answer" = "Y" ]];

I could not see $answer in my logs.

Ksh has possibility to read with a prompt:

~ [12]$ read var?"What? " 
What? no
~ [13]$ echo $var 
no

Yes, but the problem is not with the prompting in this case, it is with the read.

Given that you are having to tee the prompt to /dev/tty suggests that one of the earlier scripts has closed/redirected stdout, and if this has been done, it is quite likely that stdin has also been redirected or closed. Have you tried this:

read answer </dev/tty

I would also add a bit of debugging after the read if it's still failing:

read answer </dev/tty
echo "after read, answer=$answer" >/dev/tty

You'd at least know what it got, and whether or not it actually paused for the input. If stdin was closed or coming from a device other than the tty, then there'd be no wait, but if your script isn't writing anything else to the tty device you'd not notice that without some other message to the tty.

Hope this helps a bit.

The above code is very unusual.
This would normal if you just want to read what someone typed in response to the question:

print "Do you want to continue (y/n) ? "
read answer
if  [[ "$answer" = "y" || "$answer" = "Y" ]];
I could not see $answer in my logs.

It would be helpful to see all the scripts.
If you are trying to read the value of $answer in the calling process, this is impossible. A variable created in a sub-script is not available to the calling script. There are techniques to get round this.