Commit a71845bf authored by Matteo Quintiliani's avatar Matteo Quintiliani

Used nmxp_setsockopt_RCVTIMEO() in ShutdownHandler()


git-svn-id: file:///home/quintiliani/svncopy/nmxptool/trunk@988 3cd66e75-5955-46cb-a940-c26e5fc5497d
parent f5f7d7fe
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Istituto Nazionale di Geofisica e Vulcanologia - Italy * Istituto Nazionale di Geofisica e Vulcanologia - Italy
* quintiliani@ingv.it * quintiliani@ingv.it
* *
* $Id: nmxptool.c,v 1.161 2008-03-28 20:08:26 mtheo Exp $ * $Id: nmxptool.c,v 1.162 2008-03-30 06:07:21 mtheo Exp $
* *
*/ */
...@@ -1237,8 +1237,13 @@ static void flushing_raw_data_stream() { ...@@ -1237,8 +1237,13 @@ static void flushing_raw_data_stream() {
/* Do any needed cleanup and exit */ /* Do any needed cleanup and exit */
static void ShutdownHandler(int sig) { static void ShutdownHandler(int sig) {
/* TODO Safe Thread Synchronization */ /* TODO Safe Thread Synchronization */
sigcondition = sig; sigcondition = sig;
if(params.timeoutrecv > 0 && naqssock > 0) {
nmxp_setsockopt_RCVTIMEO(naqssock, 1);
}
nmxp_log(NMXP_LOG_WARN, NMXP_LOG_D_ANY, "%s interrupted by signal %d!\n", NMXP_LOG_STR(PACKAGE_NAME), sig); nmxp_log(NMXP_LOG_WARN, NMXP_LOG_D_ANY, "%s interrupted by signal %d!\n", NMXP_LOG_STR(PACKAGE_NAME), sig);
NMXP_MEM_PRINT_PTR; NMXP_MEM_PRINT_PTR;
......
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