Utils/Daemon: Adjust unit-test 'argv' parameter to make the test compile again
[senf.git] / Utils / Daemon / Daemon.test.cc
index 1a5990b..f6c8bf6 100644 (file)
@@ -71,21 +71,21 @@ namespace {
         }
     };
 
-    int myMain(int argc, char const ** argv)
+    int myMain(int argc, char ** argv)
     {
         MyDaemon instance;
         return instance.start(argc, argv);
     }
 
-    int run(int argc, char const ** argv)
+    int run(int argc, char ** argv)
     {
         int pid (::fork());
-        if (pid < 0) senf::throwErrno("::fork()");
+        if (pid < 0) throw senf::SystemException("::fork()");
         if (pid == 0) {
             ::_exit(myMain(argc, argv));
         }
         int status;
-        if (::waitpid(pid, &status, 0) < 0) senf::throwErrno("::waitpid()");
+        if (::waitpid(pid, &status, 0) < 0) throw senf::SystemException("::waitpid()");
         return WIFEXITED(status) ? WEXITSTATUS(status) : -1;
     }
 
@@ -93,9 +93,9 @@ namespace {
 
 BOOST_AUTO_UNIT_TEST(testDaemon)
 {
-    char const * args[] = { "run", 
-                            "--console-log=testDaemon.log,none", 
-                            "--pid-file=testDaemon.pid" };
+    char * args[] = { "run", 
+                      "--console-log=testDaemon.log,none", 
+                      "--pid-file=testDaemon.pid" };
     BOOST_CHECK_EQUAL( run(sizeof(args)/sizeof(*args),args), 0 );
 
     BOOST_CHECK( ! boost::filesystem::exists("invalid.log") );