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
af777e39
Commit
af777e39
authored
Sep 23, 2015
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set thread names, when available
parent
132dae00
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
0 deletions
+15
-0
configure.ac
configure.ac
+1
-0
monitor.c
src/monitor.c
+3
-0
varnishevent.h
src/varnishevent.h
+8
-0
writer.c
src/writer.c
+3
-0
No files found.
configure.ac
View file @
af777e39
...
...
@@ -200,6 +200,7 @@ AC_CHECK_FUNCS([timegm])
AC_CHECK_FUNCS([nanosleep])
AC_CHECK_FUNCS([setppriv])
AC_CHECK_FUNCS([getline])
AC_CHECK_FUNCS([pthread_setname_np])
save_LIBS="${LIBS}"
LIBS="${PTHREAD_LIBS}"
...
...
src/monitor.c
View file @
af777e39
...
...
@@ -29,6 +29,8 @@
*
*/
#include "config.h"
#include <syslog.h>
#include <pthread.h>
#include <errno.h>
...
...
@@ -73,6 +75,7 @@ monitor_cleanup(void *arg)
static
void
*
monitor_main
(
void
*
arg
)
{
thread_setname
(
pthread_self
(),
"vevent_monitor"
);
LOG_Log
(
LOG_NOTICE
,
"Monitor thread running every %u secs"
,
config
.
monitor_interval
);
run
=
1
;
...
...
src/varnishevent.h
View file @
af777e39
...
...
@@ -68,6 +68,14 @@
#define DEFAULT_CFORMAT \
"%h %l %u %t \"%r\" %s %b \"%{Referer}i\" \"%{User-agent}i\""
#ifdef HAVE_PTHREAD_SETNAME_NP
#define thread_setname(thr,name) pthread_setname_np((thr),(name))
#elif defined(HAVE_PTHREAD_SET_NAME_NP)
#define thread_setname(thr,name) pthread_set_name_np((thr),(name))
#else
#define thread_setname(thr,name) do { (void)(thr); (void)(name); } while(0)
#endif
struct
sigaction
default_action
;
int
tag2idx
[
MAX_VSL_TAG
];
...
...
src/writer.c
View file @
af777e39
...
...
@@ -30,6 +30,8 @@
*
*/
#include "config.h"
#include <pthread.h>
#include <stdlib.h>
#include <syslog.h>
...
...
@@ -273,6 +275,7 @@ static void
LOG_Log0
(
LOG_NOTICE
,
"Writer thread starting"
);
CHECK_OBJ_NOTNULL
(
wrt
,
WRITER_DATA_MAGIC
);
thread_setname
(
pthread_self
(),
"vevent_writer"
);
wrt
->
state
=
WRT_INITIALIZING
;
VSTAILQ_INIT
(
&
wrt_freetx
);
...
...
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