As to the 1>&2, I'm not sure why it works, but it works the way that I've posted it. I know its backwards, I'm just running with it for right now.
As to the problem; I've sort of fixed it. Hopefully this won't be overly confusing, but basically I have my test script which is calling a script that forks a child and has the parent return BEFORE the child. Odd, I know, but for reasons I won't get into here, it has to be that way.
I played around with things, and it turns out that in dashboard.pl, I have the child process redirect its STDOUT and STDERR to a file and this was masking them, but ONLY from the web, not from a terminal. Either way, I have a flag now that the test script passes which overwrites this redirect. Again, not the best solution but it works for now.
The error logs cannot be obtained from my web server unfortunately, as I am merely one of many, many users on it. I want both STDERR and STDOUT to report back to my script.
I should probably make a new thread for this, but does anyone know how to see if a child process has finished? I know I can check the pid of the parent, but how do I get the child's? My problem is now that the test script is waiting for the backticks to finish, and when dashboard's parent exits BEFORE the child does, the test script moves on to the next test case, and the previous child's output (STDOUT and STDERR) are getting jumbled with the next test's outputs.
Thanks in advance for the help, and sorry if you found this wordy/confusing.
In reply to Re^2: CGI and Backticks
by agronbach
in thread CGI and Backticks
by agronbach
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |