Rename srsd into pfix-srsd.
[apps/pfixtools.git] / srsd.c
diff --git a/srsd.c b/srsd.c
index 467c2f2..0ee15ca 100644 (file)
--- a/srsd.c
+++ b/srsd.c
@@ -45,7 +45,7 @@
 #include "mem.h"
 #include "buffer.h"
 
-#define DAEMON_NAME             "srsd"
+#define DAEMON_NAME             "pfix-srsd"
 #define DEFAULT_ENCODER_PORT    10000
 #define DEFAULT_DECODER_PORT    10001
 #define __tostr(x)  #x
@@ -408,5 +408,9 @@ int main(int argc, char *argv[])
         return EXIT_FAILURE;
     }
 
+    if (daemon_detach() < 0) {
+        syslog(LOG_CRIT, "unable to fork");
+        return EXIT_FAILURE;
+    }
     return main_loop(srs, argv[optind], port_enc, port_dec);
 }