I was forgettin' something important... If you wanna work with file descriptor you have to do like I wrote, but if you wanna work with stdio buffers you can do it in a very simpler way just calling... freopen("/dev/tty", "w", stdout); Matteo.