|
I found what is causing the bad file descriptor, however I do not know how to get the funcitonallity I want to work. I left a line out out of the f_print_log function as I was trying not to make my post to long. The function should be
function f_print_log
{
[[ $VERBOSE == 0 ]] && print $2
print -u$1 $2
return 0
}
So if I set the VERBOSE option in logtest.sh, output would be written to the screen and the file, however when f_open_log is called and it writes the "Log file open" using the f_print_log subroutine both the file descriptor and that line are sent back to logtest.sh which generates the bad descriptor.
Any suggestions. I would like to keep the Log file opened line if I can. Thanks.
|