You could try putting this as the first line of your script:

Code:
exec 0<&- 0>&- 1>&-


which will explicitly close stdin, stdout, and stderr.
_________________________
Bitt Faulk