Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
3ec54155
Commit
3ec54155
authored
Sep 04, 2017
by
Nils Goroll
Committed by
Pål Hermunn Johansen
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set the sigaltstack for each thread - SunOS needs it
Ref: #2396
parent
6568a2a6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
6 deletions
+17
-6
cache_wrk.c
bin/varnishd/cache/cache_wrk.c
+8
-0
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+9
-6
No files found.
bin/varnishd/cache/cache_wrk.c
View file @
3ec54155
...
...
@@ -41,6 +41,11 @@
#include "hash/hash_slinger.h"
#ifdef HAVE_SIGALTSTACK
#include <signal.h>
extern
stack_t
altstack
;
#endif
static
void
Pool_Work_Thread
(
struct
pool
*
pp
,
struct
worker
*
wrk
);
/*--------------------------------------------------------------------
...
...
@@ -401,6 +406,9 @@ pool_thread(void *priv)
struct
pool_info
*
pi
;
CAST_OBJ_NOTNULL
(
pi
,
priv
,
POOL_INFO_MAGIC
);
#ifdef HAVE_SIGALTSTACK
AZ
(
sigaltstack
(
&
altstack
,
NULL
));
#endif
WRK_Thread
(
pi
->
qp
,
pi
->
stacksize
,
cache_param
->
workspace_thread
);
FREE_OBJ
(
pi
);
return
(
NULL
);
...
...
bin/varnishd/mgt/mgt_child.c
View file @
3ec54155
...
...
@@ -84,6 +84,10 @@ static struct vlu *child_std_vlu;
static
struct
vsb
*
child_panic
=
NULL
;
#ifdef HAVE_SIGALTSTACK
stack_t
altstack
;
#endif
static
void
mgt_reap_child
(
void
);
/*=====================================================================
...
...
@@ -365,15 +369,14 @@ mgt_launch_child(struct cli *cli)
(
void
)
sigaction
(
SIGABRT
,
&
sa
,
NULL
);
#ifdef HAVE_SIGALTSTACK
stack_t
ss
;
size_t
sz
=
SIGSTKSZ
+
4096
;
if
(
sz
<
mgt_param
.
wthread_stacksize
)
sz
=
mgt_param
.
wthread_stacksize
;
ss
.
ss_sp
=
malloc
(
sz
);
AN
(
ss
.
ss_sp
);
ss
.
ss_size
=
sz
;
ss
.
ss_flags
=
0
;
AZ
(
sigaltstack
(
&
ss
,
NULL
));
altstack
.
ss_sp
=
malloc
(
sz
);
AN
(
altstack
.
ss_sp
);
altstack
.
ss_size
=
sz
;
altstack
.
ss_flags
=
0
;
AZ
(
sigaltstack
(
&
altstack
,
NULL
));
sa
.
sa_flags
|=
SA_ONSTACK
;
#endif
(
void
)
sigaction
(
SIGSEGV
,
&
sa
,
NULL
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment