Frederic Bouvier wrote: > Selon Maik Justus : > > >>Hi, >> >>on windows flightgear open a extra console window for the text output. >>When flightgear ends this window is closed regardless if there is any >>info the user might want to read (e. g. error messages of the xml >>parser). On windows you can not write thies messages to a file by "fgfs >>some_parameters>file" the messages are not written to file, because they >>are not written to standard output but to the extra window. (the extra >>window is necessary, because you can do not need to start it from a >>console window. I googled, if it is possible to detect, if flightgear is >>started by a console and use than this for the output, but it seems, >>that this is not possible ?!? >>Therefore I added >>#ifdef _MSC_VER >> cerr << "Hit a key to continue..." << endl; >> cin.get(); >>#endif >>to function >>void fgExitCleanup() >>but now it waits on every exit of flightgear. How can I detect, if a >>problem occurred? (can I query the exitcode ?) > > > Hi Maik, > > if you start fgfs with fgrun, fgfs output its messages in the fgrun console, > and > this console stay opened as long as fgrun runs > > -Fred >
Why is there always a simpler way (that I'm too blind to see)? ;) Actually, I did fiddle with that uSoft example and it worked up to a point. It looks like as soon as fgfs is loaded completely, the example redirector/launcher thinks the pipe gets broken and exits. My version tweaked only so it launches fgfs is here: http://139.78.95.188/redir.c Reagan Thomas ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel