Re: embedding ROOT (question 2)

From: Pasha Murat (murat@cdfsga.fnal.gov)
Date: Sat Sep 27 1997 - 06:54:10 MEST


	As it has been discussed before (see thread "TRint and stty") TRint 
redefines tty settings. It happens in the constructor. For ROOT running in embedded
mode for this reason it is not possible to declare 

TRint* theApp;

as a global variable and then just construct this variable somewhere during the
global initialization - this immediately screws up dialog with the application
into which ROOT is embedded.
However it seems, that one needs redefined tty parameters only in TRint::Run.
If this is true, then having TRint::Run, which redefines tty and 
restores it on exit, would simplify using ROOT in embedded mode (however there
might be consequences I'm not aware of...). 

The second question is also related to tty redefinition. For quite a while I've 
been using Python interpreter in exactly the same embedded mode and never had
a problem with tty settings being screwed up. Python also supports command line 
editing and command history, so it looks like it is possible to restore tty 
settings correctly even in case of abnormal termination. Python source codes
are freely available (see http://www.python.org), so may be it deserves to take 
a look at them.

					Regards, Pasha.



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:21 MET