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
0ae79f5e
Commit
0ae79f5e
authored
Nov 20, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Communicate the panic string through heritage too.
parent
9584dc03
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
96 additions
and
93 deletions
+96
-93
cache_panic.c
bin/varnishd/cache/cache_panic.c
+85
-85
common.h
bin/varnishd/common/common.h
+0
-2
heritage.h
bin/varnishd/common/heritage.h
+4
-0
mgt_child.c
bin/varnishd/mgt/mgt_child.c
+3
-3
mgt_shmem.c
bin/varnishd/mgt/mgt_shmem.c
+4
-3
No files found.
bin/varnishd/cache/cache_panic.c
View file @
0ae79f5e
This diff is collapsed.
Click to expand it.
bin/varnishd/common/common.h
View file @
0ae79f5e
...
...
@@ -50,8 +50,6 @@ extern pid_t mgt_pid;
/* mgt_shmem.c */
#define PAN_CLASS "Panic"
extern
char
*
PAN_panicstr
;
extern
unsigned
PAN_panicstr_len
;
/* varnishd.c */
extern
struct
vsb
*
vident
;
// XXX: -> heritage ?
...
...
bin/varnishd/common/heritage.h
View file @
0ae79f5e
...
...
@@ -64,6 +64,10 @@ struct heritage {
char
*
name
;
char
identity
[
1024
];
char
*
panic_str
;
ssize_t
panic_str_len
;
};
extern
struct
heritage
heritage
;
...
...
bin/varnishd/mgt/mgt_child.c
View file @
0ae79f5e
...
...
@@ -427,10 +427,10 @@ mgt_handle_panicstr(pid_t r)
{
char
time_str
[
30
];
if
(
PAN_panic
str
[
0
]
==
'\0'
)
if
(
heritage
.
panic_
str
[
0
]
==
'\0'
)
return
;
REPORT
(
LOG_ERR
,
"Child (%jd) Panic message: %s"
,
(
intmax_t
)
r
,
PAN_panic
str
);
(
intmax_t
)
r
,
heritage
.
panic_
str
);
if
(
child_panic
)
VSB_delete
(
child_panic
);
...
...
@@ -438,7 +438,7 @@ mgt_handle_panicstr(pid_t r)
XXXAN
(
child_panic
);
VTIM_format
(
VTIM_real
(),
time_str
);
VSB_printf
(
child_panic
,
"Last panic at: %s
\n
"
,
time_str
);
VSB_cat
(
child_panic
,
PAN_panic
str
);
VSB_cat
(
child_panic
,
heritage
.
panic_
str
);
AZ
(
VSB_finish
(
child_panic
));
}
...
...
bin/varnishd/mgt/mgt_shmem.c
View file @
0ae79f5e
...
...
@@ -215,7 +215,8 @@ mgt_SHM_Init(void)
AN
(
heritage
.
param
);
*
heritage
.
param
=
mgt_param
;
PAN_panicstr_len
=
64
*
1024
;
PAN_panicstr
=
VSM_Alloc
(
PAN_panicstr_len
,
PAN_CLASS
,
""
,
""
);
AN
(
PAN_panicstr
);
heritage
.
panic_str_len
=
64
*
1024
;
heritage
.
panic_str
=
VSM_Alloc
(
heritage
.
panic_str_len
,
PAN_CLASS
,
""
,
""
);
AN
(
heritage
.
panic_str
);
}
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