If you call system() with multiple arguments, the shell is bypassed; the first argument to system() is the command, and the other arguments are passed directly to the command. In order to get the redirection, you need to call system with a single argument:
system("$ci -u -zLT $file < /dev/null");
The documentation for system explains this in more detail.