To be honest I'd go with
screen which realy is the easiest solution. Maybe we can help you sort out the problems you had?
Nother thing would be to use the
fg shell command. Start the half live server in background
Code:
hlds_start > /tmp/log_hdls &
Then from the other programm run
Code:
fg
command you want to send
I guess this will not work as expected cause the fg takes another input than the programm running but who knows.
Else you would have to work with some kind of tty reader and writer.
Maybe this link helps out. I just touched it but might be the chance to write some C prog to achieve what you need.
http://www.win.tue.nl/~aeb/linux/lk/lk-11.html