[openamq-dev] Only a single thread may register signals.
Martin Sustrik
sustrik at imatix.com
Sat Jan 5 12:10:55 CET 2008
Yes, I agree. Handling signals in a library seems inappropriate anyway
(it can mess with the signal handling of the main application).
Martin
Jonathan Schultz wrote:
> There are two ways to solve this issue.
>
> 1. Decide that OpenAMQ will respond to SIGINT by just dumping everything
> immediately. In this case there is no need to register any signals at all
> - just let the default handler shut everything down abruptly.
>
> 2. Do it properly. On SIGINT OpenAMQ should abort all transfers in
> process and close all connections cleanly, including all appropriate
> handshaking. Presumably if a second SIGINT is received during this
> process then an abrupt shutdown is the most appropriate.
>
> The problem is that as it stands SMT cannot do 2. To make it work would
> require some non-trivial changes to some internal data structures.
>
> So given that no-one seems to mind the lack of clean shutdown on SIGINT,
> I'd suggest simply removing all registering of signals.
>
> Jonathan
>
>
>
>> Hi,
>>
>> No, there is no way to switch the warning off. However, you can modify
>> the source code and remove it altogether.
>>
>> Corresponding code can be found in base2/smt/smt_singal.c:
>>
>> if (thread != s_signal_thread) {
>> icl_console_print ("Only a single thread may register signals.");
>> rc = -1;
>> }
>>
>>
>> Martin
>>
>> Malinga wrote:
>>
>>> Hi,
>>>
>>> But is there any way to get rid of that warning.
>>>
>>> -Malinga
>>>
>>> ------------------------------------------------------------------------
>>> Never miss a thing. Make Yahoo your homepage.
>>> <http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> openamq-dev mailing list
>>> openamq-dev at lists.openamq.org
>>> http://lists.openamq.org/mailman/listinfo/openamq-dev
>>>
>>>
>> _______________________________________________
>> openamq-dev mailing list
>> openamq-dev at lists.openamq.org
>> http://lists.openamq.org/mailman/listinfo/openamq-dev
>>
>>
>>
>
>
> _______________________________________________
> openamq-dev mailing list
> openamq-dev at lists.openamq.org
> http://lists.openamq.org/mailman/listinfo/openamq-dev
>
More information about the openamq-dev
mailing list