Original Post
Hello, I'm making a small library for debugging/logging purposes in C++. I've an object that handles output to a console window. In Windows, I use the AllocConsole function to achieve this, in case the program using the library hasn't a console itself. Now I wanto to do that also in Linux, but I don't know how to do it. I've tried with a call to system("xterm"), but that holds the application on that line until the new created console window is closed. I'm trying with the functions openpty(...), login_tty(...) and forkpty(...), but I don't know how it works (actually I don't know if this is the way to go). Does anyone know how to create a console and redirect std::cout to it? Thanks!