I want to reopen the stdin and stdout (and perhaps stderr while I\'m at it) filehandles, so that future calls to printf()
stdin
stdout
stderr
printf()
I think you're looking for something like freopen()