Fix Control-C does not stop Metaproxy spawned by shell MP-610
[metaproxy-moved-to-github.git] / src / metaproxy_prog.cpp
index 943c3e0..c470b90 100644 (file)
@@ -266,7 +266,7 @@ static int sc_main(
             yaz_sc_running(s);
 
             yaz_daemon("metaproxy", mode | YAZ_DAEMON_LOG_REOPEN,
-                       mode == YAZ_DAEMON_DEBUG ? work_debug : work_normal,
+                       (mode & YAZ_DAEMON_FORK) ? work_normal : work_debug,
                        router, pidfile, uid);
         }
         delete router;