summaryrefslogtreecommitdiffabout
path: root/src/eyefiworker.cc
Unidiff
Diffstat (limited to 'src/eyefiworker.cc') (more/less context) (show whitespace changes)
-rw-r--r--src/eyefiworker.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/eyefiworker.cc b/src/eyefiworker.cc
index ac75fc1..1979b46 100644
--- a/src/eyefiworker.cc
+++ b/src/eyefiworker.cc
@@ -26,16 +26,18 @@ eyefiworker::eyefiworker()
26 MSG_NOSIGNAL 26 MSG_NOSIGNAL
27#elif defined(SO_NOSIGPIPE) 27#elif defined(SO_NOSIGPIPE)
28 SO_NOSIGPIPE 28 SO_NOSIGPIPE
29#else 29#else
30#error Something is wrong with sigpipe prevention on the platform 30#error Something is wrong with sigpipe prevention on the platform
31#endif 31#endif
32 ; 32 ;
33 } 33 }
34eyefiworker::~eyefiworker() {
35}
34 36
35int eyefiworker::run(int bindport) { 37int eyefiworker::run(int bindport) {
36#ifdef HAVE_SQLITE 38#ifdef HAVE_SQLITE
37 sqlite3_initialize(); 39 sqlite3_initialize();
38#endif 40#endif
39 if(!soap_valid_socket(bind(0,bindport,64))) 41 if(!soap_valid_socket(bind(0,bindport,64)))
40 throw std::runtime_error("failed to bind()"); 42 throw std::runtime_error("failed to bind()");
41 signal(SIGCHLD,SIG_IGN); 43 signal(SIGCHLD,SIG_IGN);
@@ -51,17 +53,17 @@ int eyefiworker::run(int bindport) {
51#ifndef NDEBUG 53#ifndef NDEBUG
52 struct rusage ru; 54 struct rusage ru;
53 if(getrusage(RUSAGE_SELF,&ru)) { 55 if(getrusage(RUSAGE_SELF,&ru)) {
54 syslog(LOG_NOTICE,"Failed to getrusage(): %d",errno); 56 syslog(LOG_NOTICE,"Failed to getrusage(): %d",errno);
55 }else{ 57 }else{
56 syslog(LOG_INFO,"maxrss: %ld\n",ru.ru_maxrss); 58 syslog(LOG_INFO,"maxrss: %ld\n",ru.ru_maxrss);
57 } 59 }
58#endif /* NDEBUG */ 60#endif /* NDEBUG */
59 _exit(0); 61 throw throwable_exit(0);
60 } 62 }
61 close(socket); socket = SOAP_INVALID_SOCKET; 63 close(socket); socket = SOAP_INVALID_SOCKET;
62 } 64 }
63} 65}
64 66
65static binary_t session_nonce; 67static binary_t session_nonce;
66#ifdef HAVE_SQLITE 68#ifdef HAVE_SQLITE
67 static struct { 69 static struct {