Commit 3b150500 authored by Geoff Simmons's avatar Geoff Simmons

[trackrdrd] - init script waits longer for process to stop before starting

	- monitor stats emitted one last time before abort
parent 9d31fa15
......@@ -29,7 +29,7 @@ CURL=/usr/bin/curl
VARNISH_PORT=81
URL=http://localhost:${VARNISH_PORT}/ts-rcv?testSession=true
START_RETRIES=5
START_RETRIES=10
if [ ! -e ${TRACKRDRD_BIN} ]; then
echo "${TRACKRDRD_BIN} not installed"
......
......@@ -91,10 +91,11 @@ stacktrace(void)
void
HNDL_Abort(int sig)
{
AZ(sigaction(SIGABRT, &default_action, NULL));
LOG_Log(LOG_ALERT, "Received signal %d (%s), stacktrace follows", sig,
strsignal(sig));
stacktrace();
AZ(sigaction(SIGABRT, &default_action, NULL));
MON_Output();
LOG_Log0(LOG_ALERT, "Aborting");
abort();
}
......@@ -134,6 +134,12 @@ void
pthread_exit((void *) NULL);
}
void
MON_Output(void)
{
log_output();
}
void
MON_StatusShutdown(pthread_t monitor)
{
......
......@@ -357,6 +357,7 @@ typedef enum {
} stats_update_t;
void *MON_StatusThread(void *arg);
void MON_Output(void);
void MON_StatusShutdown(pthread_t monitor);
void MON_StatsInit(void);
void MON_StatsUpdate(stats_update_t update);
......
......@@ -54,12 +54,12 @@ typedef enum {
} wrk_state_e;
static const char* statename[WRK_STATE_E_LIMIT] = {
[WRK_NOTSTARTED] = "not started",
[WRK_NOTSTARTED] = "not started",
[WRK_INITIALIZING] = "initializing",
[WRK_RUNNING] = "running",
[WRK_WAITING] = "waiting",
[WRK_RUNNING] = "running",
[WRK_WAITING] = "waiting",
[WRK_SHUTTINGDOWN] = "shutting down",
[WRK_EXITED] = "exited"
[WRK_EXITED] = "exited"
};
struct worker_data_s {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment