Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trackrdrd
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
trackrdrd
Commits
bd33c03c
Commit
bd33c03c
authored
Nov 12, 2012
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
trackrdrd: first demonized version
parent
7bba1301
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
344 additions
and
118 deletions
+344
-118
configure.ac
configure.ac
+15
-1
config.c
src/config.c
+3
-0
signals.h
src/signals.h
+41
-0
regress.sh
src/test/regress.sh
+2
-2
trackrdrd.c
src/trackrdrd.c
+282
-115
trackrdrd.h
src/trackrdrd.h
+1
-0
No files found.
configure.ac
View file @
bd33c03c
...
...
@@ -43,7 +43,20 @@ PKG_PROG_PKG_CONFIG
# Checks for header files.
AC_HEADER_STDC
#AC_CHECK_HEADERS([sys/stdlib.h])
## From Varnish configure.ac
# white lie - we don't actually test it
AC_MSG_CHECKING([whether daemon() works])
case $target in
*-*-darwin*)
# present but not functional
AC_MSG_RESULT([no])
ac_cv_func_daemon=no
;;
*)
AC_CHECK_FUNCS([daemon])
;;
esac
# Varnish source tree
AC_ARG_VAR([VARNISHSRC], [path to Varnish source tree (mandatory)])
...
...
@@ -107,6 +120,7 @@ AC_ARG_ENABLE(werror,
CXXFLAGS="${CXXFLAGS} -Werror"
)
## From activemq-cpp configure.ac
## Execute Doxygen macros
DX_HTML_FEATURE(ON)
DX_CHM_FEATURE(OFF)
...
...
src/config.c
View file @
bd33c03c
...
...
@@ -112,6 +112,7 @@ CONF_Add(const char *lval, const char *rval)
confUnsigned
(
"maxopen.scale"
,
maxopen_scale
);
confUnsigned
(
"maxdata.scale"
,
maxdata_scale
);
confUnsigned
(
"nworkers"
,
nworkers
);
confUnsigned
(
"restarts"
,
restarts
);
if
(
strcmp
(
lval
,
"syslog.facility"
)
==
0
)
{
if
((
ret
=
conf_getFacility
(
rval
))
<
0
)
...
...
@@ -177,6 +178,7 @@ CONF_Init(void)
config
.
mq_uri
[
0
]
=
'\0'
;
config
.
mq_qname
[
0
]
=
'\0'
;
config
.
nworkers
=
1
;
config
.
restarts
=
1
;
}
int
...
...
@@ -248,4 +250,5 @@ CONF_Dump(void)
confdump
(
"mq.uri = %s"
,
config
.
mq_uri
);
confdump
(
"mq.qname = %s"
,
config
.
mq_qname
);
confdump
(
"nworkers = %d"
,
config
.
nworkers
);
confdump
(
"restarts = %d"
,
config
.
restarts
);
}
src/signals.h
0 → 100644
View file @
bd33c03c
/*-
* Copyright (c) 2012 UPLEX Nils Goroll Systemoptimierung
* Copyright (c) 2012 Otto Gmbh & Co KG
* All rights reserved
* Use only with permission
*
* Author: Geoffrey Simmons <geoffrey.simmons@uplex.de>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
*/
PARENT
(
SIGTERM
,
terminate
);
PARENT
(
SIGINT
,
terminate
);
PARENT
(
SIGUSR1
,
SIG_IGN
);
PARENT
(
SIGUSR2
,
SIG_IGN
);
CHILD
(
SIGTERM
,
terminate
);
CHILD
(
SIGINT
,
terminate
);
CHILD
(
SIGUSR1
,
dump
);
CHILD
(
SIGUSR2
,
SIG_IGN
);
src/test/regress.sh
View file @
bd33c03c
...
...
@@ -14,8 +14,8 @@
echo
echo
"TEST:
$0
"
echo
"... testing log output at debug level against a known checksum"
CKSUM
=
$(
../trackrdrd
-f
varnish.binlog
-l
-
-d
-c
test.conf |
cksum
)
if
[
"
$CKSUM
"
!=
'
1094437405 229102
'
]
;
then
CKSUM
=
$(
../trackrdrd
-
D
-
f
varnish.binlog
-l
-
-d
-c
test.conf |
cksum
)
if
[
"
$CKSUM
"
!=
'
772720543 229221
'
]
;
then
echo
"ERROR: Regression test incorrect cksum:
$CKSUM
"
exit
1
fi
...
...
src/trackrdrd.c
View file @
bd33c03c
This diff is collapsed.
Click to expand it.
src/trackrdrd.h
View file @
bd33c03c
...
...
@@ -147,6 +147,7 @@ struct config {
char
mq_uri
[
BUFSIZ
];
char
mq_qname
[
BUFSIZ
];
unsigned
nworkers
;
unsigned
restarts
;
}
config
;
void
CONF_Init
(
void
);
...
...
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