Hello,

Indeed you are right !
I was working on a branch and I missed that we removed the backtrace related 
stuff in other branch due to compati ility issues with libexecinfo...
Unfortunately, we removed the sigpipe handling too, that is why I got this 
problem.

By the way, have you consider making The backtrace support optional?

Regards,

Emeric


----- Mail d'origine -----
De: Tobias Brunner <[email protected]>
À: Emeric POUPON <[email protected]>, [email protected]
Envoyé: Thu, 07 May 2015 16:18:19 +0200 (CEST)
Objet: Re: [strongSwan-dev] SIGPIPE  makes charon restart

Hi Emeric,

> It seems we have to set the signal handler for this signal before 
> instantiating the pool of threads.
> This simple naive patch does the job:
> 
> diff --git a/src/charon/charon.c b/src/charon/charon.c
> index 081e494..cd4562e 100644
> --- a/src/charon/charon.c
> +++ b/src/charon/charon.c
> @@ -298,6 +298,12 @@ int main(int argc, char *argv[])
>         /* logging for library during initialization, as we have no bus yet */
>         dbg = dbg_stderr;
>  
> +       action.sa_flags = 0;
> +       sigemptyset(&action.sa_mask);
> +       action.sa_handler = SIG_IGN;
> +       sigaction(SIGPIPE, &action, NULL);
> +
>         /* initialize library */
>         if (!library_init(NULL, "charon"))
>         {

Hm, that's exactly what's done around line 448 in that file, just before
the thread pool is "started" (i.e. before worker threads are created).
But it happens after the plugins have been initialized by the main
thread.  How exactly does your application interact with VICI and/or
charon that it triggers this?

Regards,
Tobias


_______________________________________________
Dev mailing list
[email protected]
https://lists.strongswan.org/mailman/listinfo/dev

Reply via email to