in reply to stty: : No such device or address

That depends, what is the script trying to do in the background? Also, how are you calling the script running in the background?