-rw-r--r-- | src/eyefiworker.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/eyefiworker.cc b/src/eyefiworker.cc index 9dcd048..450661a 100644 --- a/src/eyefiworker.cc +++ b/src/eyefiworker.cc | |||
@@ -1,4 +1,8 @@ | |||
1 | #include <signal.h> | 1 | #include <signal.h> |
2 | #ifndef NDEBUG | ||
3 | # include <sys/resource.h> | ||
4 | #endif | ||
5 | #include <syslog.h> | ||
2 | #include <stdexcept> | 6 | #include <stdexcept> |
3 | #include "eyefiworker.h" | 7 | #include "eyefiworker.h" |
4 | #ifdef HAVE_SQLITE | 8 | #ifdef HAVE_SQLITE |
@@ -35,6 +39,14 @@ int eyefiworker::run(int bindport) { | |||
35 | recv_timeout = 600; send_timeout = 120; | 39 | recv_timeout = 600; send_timeout = 120; |
36 | (void)serve(); | 40 | (void)serve(); |
37 | soap_destroy(this); soap_end(this); soap_done(this); | 41 | soap_destroy(this); soap_end(this); soap_done(this); |
42 | #ifndef NDEBUG | ||
43 | struct rusage ru; | ||
44 | if(getrusage(RUSAGE_SELF,&ru)) { | ||
45 | syslog(LOG_NOTICE,"Failed to getrusage(): %d",errno); | ||
46 | }else{ | ||
47 | syslog(LOG_INFO,"maxrss: %ld\n",ru.ru_maxrss); | ||
48 | } | ||
49 | #endif /* NDEBUG */ | ||
38 | _exit(0); | 50 | _exit(0); |
39 | } | 51 | } |
40 | close(socket); socket = SOAP_INVALID_SOCKET; | 52 | close(socket); socket = SOAP_INVALID_SOCKET; |