I'm not following 100% (more code would be useful). But I think you should print errors to STDERR and in your calling script (or cmdline invoke), redirect STDOUT and STDERR to different files.
In reply to Re^3: Returning a bad status back to the parent UNIX process
by derby
in thread Returning a bad status back to the parent UNIX process
by JimRobinson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |