summaryrefslogtreecommitdiff
path: root/src/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.cc')
-rw-r--r--src/main.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/main.cc b/src/main.cc
index c8393e8..1d3a35d 100644
--- a/src/main.cc
+++ b/src/main.cc
@@ -41,7 +41,7 @@ static void sig_end(int signo)
exit(0);
}
-static void sig_user(int signo)
+static void sig_user1(int signo)
{
if (g_lb)
delete g_lb;
@@ -50,6 +50,13 @@ static void sig_user(int signo)
exit(0);
}
+static void sig_user2(int signo)
+{
+ //used to wake up the process
+ cerr << "User signal: " << signo << endl;
+ syslog(LOG_ERR, "wan_lb, user exit signal caught, exiting..");
+}
+
int main(int argc, char* argv[])
{
@@ -132,7 +139,8 @@ int main(int argc, char* argv[])
// sighup...
signal(SIGINT, sig_end);
signal(SIGTERM, sig_end);
- signal(SIGUSR1, sig_user);
+ signal(SIGUSR1, sig_user1);
+ signal(SIGUSR2, sig_user2);
//drop into event loop
do {