gnunet-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GNUnet-developers] Consider phasing out GNUNET_SERVICE_MAIN


From: Christian Grothoff
Subject: Re: [GNUnet-developers] Consider phasing out GNUNET_SERVICE_MAIN
Date: Sun, 8 Sep 2019 06:04:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 9/7/19 4:20 PM, Alessio Vanni wrote:
> Christian Grothoff <address@hidden> writes:
> 
>> but in this case there seems to be a better alternative: use
>> a C constructor to call GNUNET_OS_init():
>>
>> /**
>>  * Initialize i18n
>>  */
>> void __attribute__ ((constructor)) i18n_init () {
>>   GNUNET_OS_init (...);
>> }
>>
>> Constructors run before main(), so that should fix your problem nicely.
> 
> I wasn't aware of this feature.  Would it be OK to add a constructor
> calling `GNUNET_OS_init' in the gnunet-ext service?  It seems to be
> something that a reference implementation/template might want to show.

Sure, overall gnunet-ext could certainly be improved by illustrating
more things. Patches welcome ;-)

-Christian

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]