in reply to Some things I would have never guessed...
in thread redirecting STDERR from shell commands

system() forks, so just like any other forked child process, it inherits any IO handle definitions from the parent process. just fyi.