I can't test this right now, but I suspect you are being misled by buffering. I recall that strace writes to STDERR, which is normally non-buffered. However you are redirecting it to STDOUT (which you have to do to use the pipe) which is buffered. $|=1;before the open is worth a try.