question

Upvotes
Accepted
7 4 1 4

Signal Handler Issue

Hi,

I'd like to ask how does the ETA API handles SIGTERM / SIGINT?

Whenever I have a SIGTERM, I figured that the "cleanupAndExit" will be triggered. However, after the cleanupAndExit, I can also see more log info about the "RSSL_RC_CET_CHANNEL_DOWN" under "channelEventCallback" which closes the connection and gives me following error.

16:41:26.931116 ERROR Connection down: Channel fd=11
16:41:26.931132 ERROR Error text: Reactor is shutting down.

Basically, can you explain what will happen after the program receives an signal?

Thanks!

elektronrefinitiv-realtimeelektron-sdkrrteta-apielektron-transport-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

This question is ETA API so we move it ETA section instead.

@moragodkrit, @Umer Nalla
Could you please provide a response to this question?
Thanks.

Hello @jerrymao,

Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise, please post again offering further insight into your question.

Thanks,

-AHS

@jerrymao

Hi,

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
79.2k 251 52 74

@jerrymao

I have verified the ETA code and found that ETA API doesn't register any handlers for SIGTERM and SIGINT. The ETA code is available in the package or GitHub. Therefore, by default, it will use the default action (terminating the process) to handle those signals.

In your case, I assume that the application may register a handler for SIGTERM or SIGINT. Then, the thread that handles the SIGTERM or SIGINT is not the same thread that calls the channelEventCallback function. It could be a race condition between those threads.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.