You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by Fei Deng <du...@apache.org> on 2020/02/28 20:21:06 UTC

[NEW API Proposal] TSThreadCreateWithSignalling

Recently while dealing with shutdown crashes related to plugins, I found a
way to have individual threads process signals with their own signal
handlers. After discussing with Alan, we agreed on that this might be too
much freedom to open to people since signal handling is really tricky to do
correctly, so we tuned it down to have only the ability to let threads
listen to signals SIGTERM and SIGINT, and exit itself right there rather
than having to make their own signal handler. The purpose of this is to let
the threads created by plugins have the ability to just listen to the two
signals mentioned above, and stop doing things and exit right away, this
will speed up the shutdown process a lot.

I already have it working with the code here
https://github.com/duke8253/trafficserver/pull/9.

Re: [NEW API Proposal] TSThreadCreateWithSignalling

Posted by Alan Carroll <so...@verizonmedia.com.INVALID>.
This seems reasonable and there's no apparent opposition, I think we should
proceed.

On Fri, Feb 28, 2020 at 2:21 PM Fei Deng <du...@apache.org> wrote:

> Recently while dealing with shutdown crashes related to plugins, I found a
> way to have individual threads process signals with their own signal
> handlers. After discussing with Alan, we agreed on that this might be too
> much freedom to open to people since signal handling is really tricky to do
> correctly, so we tuned it down to have only the ability to let threads
> listen to signals SIGTERM and SIGINT, and exit itself right there rather
> than having to make their own signal handler. The purpose of this is to let
> the threads created by plugins have the ability to just listen to the two
> signals mentioned above, and stop doing things and exit right away, this
> will speed up the shutdown process a lot.
>
> I already have it working with the code here
> https://github.com/duke8253/trafficserver/pull/9.
>