question

Upvotes
Accepted
7 2 0 3

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 5.0 MiB each and 10.0 MiB total.

1 Answer

Upvotes
Accepted
38.1k 69 35 53

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea