I’m writing a GUI that basically controls the execution of other programs. I’ve used TSystem::OpenPipe to execute the program. Then, I read the pipe with TString::Gets and display it in the GUI with TGListBox::AddLine. Everything is simple and works very well, however, if the program running does not write a newline, the Gets method keeps waiting for it forever and blocks the execution of the program.
Is there a way to avoid this problem? Is there something like a signal that I can connect to a method of my GUI class that is raised when the pipe is ready to be read? If there is, how is this implemented in ROOT?
okay, this is going a bit away from ROOT and more to generic C / C++… Google is usually pretty helpful with that. It shows e.g. ubuntuforums.org/showthread.php?t=936816