[Gambas-user] Signal management

Benoît Minisini gambas at ...1...
Tue Jul 13 13:49:59 CEST 2010


I don't remember who needed signal management in Gambas.

But it's there now in Gambas 3 since revision #3037, through a new component 
named "gb.signal" and a static class named "Signal".

Signal.Ignore(<signal number>) to ignore a signal.
Signal.Catch(<signal number>) to catch a signal.

A catched signal raises an event that must be handled by a static public 
function named "Application_Signal" located in the startup class. That event 
handler takes the signal number as argument.

Signal.Reset(<signal number>) to reset a signal to its default behaviour.

All signal numbers have associated numeric constants in the Signal class. For 
example: Signal.Ignore(Signal.SIGINT)

The signal management is not perfect yet. For example, don't override SIGCHLD 
at the moment, otherwise process management won't work anymore.

If you use it, please send your comments to me.


Benoît Minisini

More information about the User mailing list