Re: [ROOT] ctrl-C handler

From: Damir Buskulic (buskulic@lapp.in2p3.fr)
Date: Wed Nov 21 2001 - 09:48:20 MET


Yes, I've had the same problem and used the gSystem->ResetSignal()
method :

   gSystem->ResetSignal(kSigInterrupt);

search for kSig in the root headers to see the other potential signal
you may wish to deactivate. Of course, you should activate your own
handler.
I don't know if all this works in a script, though. The deactivation
probably but the activation, not sure.

Cheers

Damir

Ken Teh wrote:
> 
> Is it possible to install a handler in a root "script" to trap keyboard
> breaks?  I have a script that contacts a server via a TSocket and on each
> keyboard break, the server goes defunct.  If the TSocket is closed
> properly, this does not happen.
> 
> Thanks! Ken
> 
> /+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\
> | Kenneth Teh                                Email: teh@phy.anl.gov |
> | Argonne National Laboratory                  Tel: 630-252-3073    |
> | 9700 S. Cass Ave.                            Fax: 630-252-2864    |
> | Argonne, IL 60439                                                 |
> \+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++/

-- 
=====================================================================
| Damir Buskulic                  | Universite de Savoie/LAPP       |
|                                 | Chemin de Bellevue, B.P. 110    |
| Tel : +33 (0)450091600          | F-74941 Annecy-le-Vieux Cedex   |
| e-mail: buskulic@lapp.in2p3.fr  | FRANCE                          |
=====================================================================
mailto:buskulic@lapp.in2p3.fr



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:51:09 MET