You should use a pipe, but that might introduce a deadlock since you're using synchronous IO to print.
Since you don't seem to care if it's a system handle or not, use a tied handle. You wouldn't even have to poll; the output could be added to Tickit as soon as it's printed.
In reply to Re: Race when redirecting output.
by ikegami
in thread Race when redirecting output.
by gnosti
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |