Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnishevent
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
varnishevent
Commits
20470f5b
Commit
20470f5b
authored
Apr 14, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
restore handler.c -- no compatibility mode, and hence no stack traces,
if execinfo.h is not present
parent
dafd20fd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
14 deletions
+16
-14
Makefile.am
src/Makefile.am
+2
-3
handler.c
src/handler.c
+14
-5
varnishevent.c
src/varnishevent.c
+0
-4
varnishevent.h
src/varnishevent.h
+0
-2
No files found.
src/Makefile.am
View file @
20470f5b
...
...
@@ -22,9 +22,8 @@ varnishevent_SOURCES = \
monitor.c
\
strfTIM.h
\
strfTIM.c
\
format.c
# handler.c
format.c
\
handler.c
varnishevent_LDADD
=
\
${
PTHREAD_LIBS
}
${
RT_LIBS
}
${
LIBM
}
@VARNISH_LIBS@
\
...
...
src/handler.c
View file @
20470f5b
...
...
@@ -42,10 +42,9 @@
#include <syslog.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#ifndef HAVE_EXECINFO_H
#include "compat/execinfo.h"
#else
#ifdef HAVE_EXECINFO_H
#include <execinfo.h>
#endif
...
...
@@ -67,6 +66,8 @@
* +1 to phk's rant in varnishd.c about the lack of a standard for this.
*/
#ifdef HAVE_EXECINFO_H
struct
symbols
{
uintptr_t
a
;
char
*
n
;
...
...
@@ -165,19 +166,27 @@ stacktrace(void)
}
}
#endif
void
HNDL_Init
(
const
char
*
a0
)
{
#ifdef HAVE_EXECINFO_H
symbol_hack
(
a0
);
#else
(
void
)
a0
;
#endif
}
void
HNDL_Abort
(
int
sig
)
{
AZ
(
sigaction
(
SIGABRT
,
&
default_action
,
NULL
));
LOG_Log
(
LOG_ALERT
,
"Received signal %d (%s), stacktrace follows"
,
sig
,
strsignal
(
sig
));
LOG_Log
(
LOG_ALERT
,
"Received signal %d (%s)"
,
sig
,
strsignal
(
sig
));
#ifdef HAVE_EXECINFO_H
LOG_Log0
(
LOG_NOTICE
,
"Stacktrace follows"
);
stacktrace
();
#endif
CONF_Dump
();
DATA_Dump
();
MON_Output
();
...
...
src/varnishevent.c
View file @
20470f5b
...
...
@@ -562,16 +562,12 @@ main(int argc, char *argv[])
AZ
(
sigemptyset
(
&
reopen_action
.
sa_mask
));
reopen_action
.
sa_flags
|=
SA_RESTART
;
#if 0
stacktrace_action
.
sa_handler
=
HNDL_Abort
;
#endif
ignore_action
.
sa_handler
=
SIG_IGN
;
default_action
.
sa_handler
=
SIG_DFL
;
#if 0
HNDL_Init
(
argv
[
0
]);
#endif
/* Install signal handlers */
#include "signals.h"
...
...
src/varnishevent.h
View file @
20470f5b
...
...
@@ -296,10 +296,8 @@ int FMT_Estimate_RecsPerTx(void);
void
FMT_Format
(
tx_t
*
tx
,
struct
vsb
*
os
);
void
FMT_Fini
(
void
);
#if 0
/* handler.c */
void
HNDL_Init
(
const
char
*
a0
);
void
HNDL_Abort
(
int
sig
);
#endif
#endif
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