[Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1132: Dbus will only monitor the first declared bus for signals

Tony Morehen tmorehen at ...3602...
Thu Aug 31 05:35:01 CEST 2017


I thought some more about what you wrote and I tried:

1) Created a Main module and set it as the startup class.
2) Moved FMain's _new code (setting up signal handlers etc) to Sub 
Main() in module Main
3) Moved all other code into Main
4) deleted FMain and removed all components except gb.DBus and gb.base

Everything worked.  I have my daemon with a minimum of memory overhead.  
Brilliant!


On 2017-08-30 06:10 PM, Benoît Minisini wrote:
> Le 31/08/2017 à 00:07, Tony Morehen a écrit :
>> It is indeed fixed.  Thanks Benoit!
>>
>> BTW is there any way to add an event loop to a console app?  ie I 
>> want to use a console app as a daemon, responding to dbus signals.
>>
>
> There is always an event loop in Gambas programs. It starts as soon as 
> the Main() function is finished.
>






More information about the User mailing list