Search code examples
cconsolestdoutgtk3

How to rediredt the stdout in a text window - c programming


I would like to realize in GTK3 a text window where to redirect the stdout using the c language. Could you help me with suggestions about how to start. Thank you.


Solution

  • I think what you'll need to do is write GTK code that reads from a named pipe and writes to the text box, and when you start your other c code (assuming you're starting it from a shell command), redirect stdout to the named pipe.