[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9808: use uninstalled cygnal executa
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9808: use uninstalled cygnal executable. |
Date: |
Sat, 29 Nov 2008 18:18:16 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9808
committer: address@hidden
branch nick: rtmp
timestamp: Sat 2008-11-29 18:18:16 -0700
message:
use uninstalled cygnal executable.
modified:
cygnal/cygnal.cpp
=== modified file 'cygnal/cygnal.cpp'
--- a/cygnal/cygnal.cpp 2008-11-29 20:25:32 +0000
+++ b/cygnal/cygnal.cpp 2008-11-30 01:18:16 +0000
@@ -91,6 +91,7 @@
static void usage();
static void version_and_copyright();
static void cntrlc_handler(int sig);
+static void hup_handler(int sig);
void connection_handler(Handler::thread_params_t *args);
void dispatch_handler(Handler::thread_params_t *args);
@@ -99,8 +100,6 @@
// Toggles very verbose debugging info from the network Network class
static bool netdebug = false;
-static struct sigaction act;
-
// The next few global variables have to be global because Boost
// threads don't take arguments. Since these are set in main() before
// any of the threads are started, and it's value should never change,
@@ -250,8 +249,11 @@
}
// Trap ^C (SIGINT) so we can kill all the threads
- act.sa_handler = cntrlc_handler;
- sigaction (SIGINT, &act, NULL);
+ struct sigaction act1, act2;
+ act1.sa_handler = cntrlc_handler;
+ sigaction (SIGINT, &act1, NULL);
+ act2.sa_handler = hup_handler;
+ sigaction (SIGHUP, &act2, NULL);
// sigaction (SIGPIPE, &act, NULL);
boost::mutex::scoped_lock lk(alldone_mutex);
@@ -310,7 +312,7 @@
return(0);
}
-// Trap Control-C so we can cleanly exit
+// Trap Control-C (SIGINT) so we can cleanly exit
static void
cntrlc_handler (int sig)
{
@@ -319,6 +321,16 @@
exit(-1);
}
+// Trap SIGHUP so we can
+static void
+hup_handler (int sig)
+{
+ if (crcfile.getTestingFlag()) {
+ cerr << "Testing, Testing, Testing..." << endl;
+ }
+
+}
+
static void
version_and_copyright()
{
@@ -596,6 +608,7 @@
// continue;
}
log_debug("Got something on fd #%d, 0x%x", it->fd,
it->revents);
+ // Call the protocol handler for this network connection
hand->getEntry(it->fd)(args);
// if (!crcfile.getThreadingFlag()) {
// hand->die();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9808: use uninstalled cygnal executable.,
rob <=