sigpipe: init the struct so that first apply ignores

Initializes 'no_signal' to TRUE, so that a call to sigpipe_apply() after
init ignores the signal (unless CURLOPT_NOSIGNAL) is set.

I have read the existing code multiple times now and I think it gets the
initial state reversed this missing to ignore.

Regression from 17e6f06ea3

Reported-by: Rasmus Thomsen
Fixes #14344
Closes #14390
This commit is contained in:
Daniel Stenberg 2024-08-05 00:17:17 +02:00
parent 8d98118026
commit 3eec5afbd0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -39,6 +39,7 @@ struct sigpipe_ignore {
static void sigpipe_init(struct sigpipe_ignore *ig)
{
memset(ig, 0, sizeof(*ig));
ig->no_signal = TRUE;
}
/*