-fixes
[oweals/gnunet.git] / src / testing / testing.c
index 16cee9037203ae88d5ab669cabed9ee97f5167a6..7a2a2b87a1f358f2875f808644fe4ce4f1dbaade 100644 (file)
@@ -192,7 +192,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   {
   case SP_COPYING:
     /* confirm copying complete */
-    if (GNUNET_OK != GNUNET_OS_process_status (d->proc, &type, &code))
+    if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_copying, &type, &code))
     {
       if (GNUNET_TIME_absolute_get_remaining (d->max_timeout).rel_value == 0)
       {
@@ -218,7 +218,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         cb (d->cb_cls, NULL, d->cfg, d, _("`scp' did not complete cleanly.\n"));
       return;
     }
-    GNUNET_OS_process_close (d->proc);
+    GNUNET_OS_process_close (d->proc_arm_copying);
+    d->proc_arm_copying = NULL;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Successfully copied configuration file.\n");
     d->phase = SP_COPIED;
@@ -227,6 +228,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     /* Start create hostkey process if we don't already know the peer identity! */
     if (GNUNET_NO == d->have_hostkey)
     {
+      GNUNET_assert (NULL == d->proc_arm_peerinfo);
       d->pipe_stdout = GNUNET_DISK_pipe (GNUNET_NO, GNUNET_NO, GNUNET_NO, GNUNET_YES);
       if (d->pipe_stdout == NULL)
       {
@@ -246,7 +248,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                     "Starting `%s', with command `%s %s %s %s'.\n",
                     "gnunet-peerinfo", "gnunet-peerinfo", "-c", d->cfgfile,
                     "-sq");
-        d->proc =
+        d->proc_arm_peerinfo =
            GNUNET_OS_start_process (GNUNET_YES, NULL, d->pipe_stdout, "gnunet-peerinfo",
                                      "gnunet-peerinfo", "-c", d->cfgfile, "-sq",
                                      NULL);
@@ -265,7 +267,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                     d->cfgfile, "-sq");
         if (d->ssh_port_str == NULL)
         {
-          d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, d->pipe_stdout, "ssh", "ssh",
+          d->proc_arm_peerinfo = GNUNET_OS_start_process (GNUNET_NO, NULL, d->pipe_stdout, "ssh", "ssh",
 #if !DEBUG_TESTING
                                              "-q",
 #endif
@@ -274,7 +276,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         }
         else
         {
-          d->proc =
+          d->proc_arm_peerinfo =
              GNUNET_OS_start_process (GNUNET_NO, NULL, d->pipe_stdout, "ssh", "ssh", "-p",
                                        d->ssh_port_str,
 #if !DEBUG_TESTING
@@ -286,7 +288,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         GNUNET_DISK_pipe_close_end (d->pipe_stdout, GNUNET_DISK_PIPE_END_WRITE);
         GNUNET_free (dst);
       }
-      if (NULL == d->proc)
+      if (NULL == d->proc_arm_peerinfo)
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     _("Could not start `%s' process to create hostkey.\n"),
@@ -366,10 +368,10 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       d->cb = NULL;
       GNUNET_DISK_pipe_close (d->pipe_stdout);
       d->pipe_stdout = NULL;
-      (void) GNUNET_OS_process_kill (d->proc, SIGKILL);
-      GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (d->proc));
-      GNUNET_OS_process_close (d->proc);
-      d->proc = NULL;
+      (void) GNUNET_OS_process_kill (d->proc_arm_peerinfo, SIGKILL);      
+      GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (d->proc_arm_peerinfo));
+      GNUNET_OS_process_close (d->proc_arm_peerinfo);      
+      d->proc_arm_peerinfo = NULL;
       if (NULL != cb)
         cb (d->cb_cls, NULL, d->cfg, d, _("Failed to get hostkey!\n"));
       return;
@@ -377,10 +379,10 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     d->shortname = GNUNET_strdup (GNUNET_i2s (&d->id));
     GNUNET_DISK_pipe_close (d->pipe_stdout);
     d->pipe_stdout = NULL;
-    (void) GNUNET_OS_process_kill (d->proc, SIGKILL);
-    GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (d->proc));
-    GNUNET_OS_process_close (d->proc);
-    d->proc = NULL;
+    (void) GNUNET_OS_process_kill (d->proc_arm_peerinfo, SIGKILL);
+    GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (d->proc_arm_peerinfo));
+    GNUNET_OS_process_close (d->proc_arm_peerinfo);
+    d->proc_arm_peerinfo = NULL;
     d->have_hostkey = GNUNET_YES;
     if (d->hostkey_callback != NULL)
     {
@@ -419,7 +421,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                   "Starting `%s', with command `%s %s %s %s %s %s'.\n",
                   "gnunet-arm", "gnunet-arm", "-c", d->cfgfile, "-L", "DEBUG",
                   "-s");
-      d->proc =
+      d->proc_arm_start =
          GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm", "-c",
                                    d->cfgfile,
                                    "-L", "DEBUG",
@@ -441,7 +443,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                   "-L", "DEBUG", "-s", "-q");
       if (d->ssh_port_str == NULL)
       {
-        d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
+        d->proc_arm_start = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
 #if !DEBUG_TESTING
                                            "-q",
 #endif
@@ -457,7 +459,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       else
       {
 
-        d->proc =
+        d->proc_arm_start =
            GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh", "-p",
                                      d->ssh_port_str,
 #if !DEBUG_TESTING
@@ -474,7 +476,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       }
       GNUNET_free (dst);
     }
-    if (NULL == d->proc)
+    if (NULL == d->proc_arm_start)
     {
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                   _("Could not start `%s' process to start GNUnet.\n"),
@@ -497,7 +499,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
                                       d);
     break;
   case SP_START_ARMING:
-    if (GNUNET_OK != GNUNET_OS_process_status (d->proc, &type, &code))
+    if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_start, &type, &code))
     {
       if (GNUNET_TIME_absolute_get_remaining (d->max_timeout).rel_value == 0)
       {
@@ -520,10 +522,11 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         }
         GNUNET_free_non_null (d->hostname);
         GNUNET_free_non_null (d->username);
-        GNUNET_free (d->proc);
-//         GNUNET_free (d); // FIXME (could this leak)
+        GNUNET_free (d->proc_arm_start);
+       d->proc_arm_start = NULL;
         d->hostname = NULL;     // Quick hack to avoid crashing (testing need to be
         d->cfg = NULL;          // overhauled anyway, and the error managing is
+       // GNUNET_free (d); // FIXME (could this leak)
         // pretty broken anyway.
         return;
       }
@@ -535,7 +538,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     }
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Successfully started `%s'.\n",
                 "gnunet-arm");
-    GNUNET_free (d->proc);
+    GNUNET_free (d->proc_arm_start);
+    d->proc_arm_start = NULL;
     d->phase = SP_START_CORE;
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Calling CORE_connect\n");
     /* Fall through */
@@ -600,7 +604,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     break;
   case SP_SERVICE_START:
     /* confirm gnunet-arm exited */
-    if (GNUNET_OK != GNUNET_OS_process_status (d->proc, &type, &code))
+    if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_srv_start, &type, &code))
     {
       if (GNUNET_TIME_absolute_get_remaining (d->max_timeout).rel_value == 0)
       {
@@ -643,7 +647,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     break;
   case SP_SERVICE_SHUTDOWN_START:
     /* confirm copying complete */
-    if (GNUNET_OK != GNUNET_OS_process_status (d->proc, &type, &code))
+    if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_srv_stop, &type, &code))
     {
       if (GNUNET_TIME_absolute_get_remaining (d->max_timeout).rel_value == 0)
       {
@@ -674,8 +678,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       d->dead_cb (d->dead_cb_cls, NULL);
     break;
   case SP_SHUTDOWN_START:
-    /* confirm copying complete */
-    if (GNUNET_OK != GNUNET_OS_process_status (d->proc, &type, &code))
+    /* confirm copying complete !??? */
+    if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_stop, &type, &code))
     {
       if (GNUNET_TIME_absolute_get_remaining (d->max_timeout).rel_value == 0)
       {
@@ -704,8 +708,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
         GNUNET_free_non_null (d->hostname);
         GNUNET_free_non_null (d->username);
         GNUNET_free_non_null (d->shortname);
-        GNUNET_free_non_null (d->proc);
-        d->proc = NULL;
+        // GNUNET_free_non_null (d->proc); // !? FIXME
+        // d->proc_arm_stop = NULL; 
         GNUNET_free (d);
         return;
       }
@@ -740,8 +744,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
       GNUNET_free_non_null (d->hostname);
       GNUNET_free_non_null (d->username);
       GNUNET_free_non_null (d->shortname);
-      GNUNET_free_non_null (d->proc);
-      d->proc = NULL;
+      // GNUNET_free_non_null (d->proc); // !? FIXME!
+      // d->proc = NULL; // !? FIXME!
       GNUNET_free (d);
       return;
     }
@@ -776,8 +780,8 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     GNUNET_free_non_null (d->hello);
     d->hello = NULL;
     GNUNET_free_non_null (d->shortname);
-    GNUNET_free_non_null (d->proc);
-    d->proc = NULL;
+    // GNUNET_free_non_null (d->proc); // !? FIXME
+    // d->proc = NULL; // !? FIXME!
     d->shortname = NULL;
     if (d->churn == GNUNET_NO)
       GNUNET_free (d);
@@ -785,7 +789,7 @@ start_fsm (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
     break;
   case SP_CONFIG_UPDATE:
     /* confirm copying complete */
-    if (GNUNET_OK != GNUNET_OS_process_status (d->proc, &type, &code))
+    if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_copying, &type, &code))
     {
       if (GNUNET_TIME_absolute_get_remaining (d->max_timeout).rel_value == 0)   /* FIXME: config update should take timeout parameter! */
       {
@@ -902,7 +906,7 @@ GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon *d,
     else
       arg = GNUNET_strdup (d->hostname);
 
-    d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
+    d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
 #if !DEBUG_TESTING
                                        "-q",
 #endif
@@ -923,7 +927,7 @@ GNUNET_TESTING_daemon_start_stopped_service (struct GNUNET_TESTING_Daemon *d,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Starting gnunet-arm with config `%s' locally.\n", d->cfgfile);
-    d->proc = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
+    d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
 #if DEBUG_TESTING
                                        "-L", "DEBUG",
 #endif
@@ -978,7 +982,7 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
     else
       arg = GNUNET_strdup (d->hostname);
 
-    d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
+    d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
 #if !DEBUG_TESTING
                                        "-q",
 #endif
@@ -1000,7 +1004,7 @@ GNUNET_TESTING_daemon_start_service (struct GNUNET_TESTING_Daemon *d,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Starting gnunet-arm with config `%s' locally.\n", d->cfgfile);
-    d->proc = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
+    d->proc_arm_srv_start = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
 #if DEBUG_TESTING
                                        "-L", "DEBUG",
 #endif
@@ -1210,7 +1214,7 @@ GNUNET_TESTING_daemon_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
       GNUNET_free (baseservicehome);
       if (ret->ssh_port_str == NULL)
       {
-        ret->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "scp", "scp", "-r",
+        ret->proc_arm_copying = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "scp", "scp", "-r",
 #if !DEBUG_TESTING
                                              "-q",
 #endif
@@ -1221,7 +1225,7 @@ GNUNET_TESTING_daemon_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
       }
       else
       {
-        ret->proc =
+        ret->proc_arm_copying =
            GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "scp", "scp", "-r", "-P",
                                      ret->ssh_port_str,
 #if !DEBUG_TESTING
@@ -1230,7 +1234,7 @@ GNUNET_TESTING_daemon_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
                                      servicehome, arg, NULL);
       }
       GNUNET_free (arg);
-      if (NULL == ret->proc)
+      if (NULL == ret->proc_arm_copying)
       {
         GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                     _
@@ -1334,7 +1338,7 @@ GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
     else
       arg = GNUNET_strdup (d->hostname);
 
-    d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
+    d->proc_arm_stop = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
 #if !DEBUG_TESTING
                                        "-q",
 #endif
@@ -1351,7 +1355,7 @@ GNUNET_TESTING_daemon_restart (struct GNUNET_TESTING_Daemon *d,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Stopping gnunet-arm with config `%s' locally.\n", d->cfgfile);
-    d->proc = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
+    d->proc_arm_stop = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
 #if DEBUG_TESTING
                                        "-L", "DEBUG",
 #endif
@@ -1414,8 +1418,8 @@ GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
       GNUNET_asprintf (&arg, "%s@%s", d->username, d->hostname);
     else
       arg = GNUNET_strdup (d->hostname);
-
-    d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
+    
+    d->proc_arm_srv_stop = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
 #if !DEBUG_TESTING
                                        "-q",
 #endif
@@ -1436,7 +1440,7 @@ GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Stopping gnunet-arm with config `%s' locally.\n", d->cfgfile);
-    d->proc = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
+    d->proc_arm_srv_stop = GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm",
 #if DEBUG_TESTING
                                        "-L", "DEBUG",
 #endif
@@ -1451,6 +1455,20 @@ GNUNET_TESTING_daemon_stop_service (struct GNUNET_TESTING_Daemon *d,
 }
 
 
+/**
+ * Forcefully terminate a process and clean up the child.
+ *
+ * @param proc handle to process to kill
+ */
+static void
+kill_and_close_process (struct GNUNET_OS_Process *proc)
+{
+  (void) GNUNET_OS_process_kill (proc, SIGKILL);      
+  GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (proc));
+  GNUNET_OS_process_close (proc);
+}
+
+
 /**
  * Stops a GNUnet daemon.
  *
@@ -1482,7 +1500,31 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
     d->dead = GNUNET_YES;
     return;
   }
-
+  if (NULL != d->proc_arm_start)
+  {
+    kill_and_close_process (d->proc_arm_start);
+    d->proc_arm_start = NULL;
+  }
+  if (NULL != d->proc_arm_srv_start)
+  {
+    kill_and_close_process (d->proc_arm_srv_start);
+    d->proc_arm_srv_start = NULL;
+  }
+  if (NULL != d->proc_arm_srv_stop)
+  {
+    kill_and_close_process (d->proc_arm_srv_stop);
+    d->proc_arm_srv_stop = NULL;
+  }
+  if (NULL != d->proc_arm_copying)
+  {
+    kill_and_close_process (d->proc_arm_copying);
+    d->proc_arm_copying = NULL;
+  }
+  if (NULL != d->proc_arm_peerinfo)
+  {
+    kill_and_close_process (d->proc_arm_peerinfo);
+    d->proc_arm_peerinfo = NULL;
+  }
   if ((d->running == GNUNET_NO) && (d->churn == GNUNET_YES))    /* Peer has already been stopped in churn context! */
   {
     /* Free what was left from churning! */
@@ -1500,6 +1542,7 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
     GNUNET_free_non_null (d->username);
     if (NULL != d->dead_cb)
       d->dead_cb (d->dead_cb_cls, NULL);
+    GNUNET_assert (NULL == d->proc_arm_stop);
     GNUNET_free (d);
     return;
   }
@@ -1537,6 +1580,8 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
     d->th = NULL;
   }
   /* Check if this is a local or remote process */
+
+
   if (NULL != d->hostname)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1547,7 +1592,7 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
     else
       arg = GNUNET_strdup (d->hostname);
 
-    d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
+    d->proc_arm_stop = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
 #if !DEBUG_TESTING
                                        "-q",
 #endif
@@ -1568,14 +1613,14 @@ GNUNET_TESTING_daemon_stop (struct GNUNET_TESTING_Daemon *d,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
                 "Stopping gnunet-arm with config `%s' locally.\n", d->cfgfile);
-    d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "gnunet-arm", "gnunet-arm",
+    d->proc_arm_stop = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "gnunet-arm", "gnunet-arm",
 #if DEBUG_TESTING
                                        "-L", "DEBUG",
 #endif
                                        "-c", d->cfgfile, "-e", "-q", "-T",
                                        GNUNET_TIME_relative_to_string (timeout),
                                        del_arg, NULL);
-    GNUNET_assert (NULL != d->proc);
+    GNUNET_assert (NULL != d->proc_arm_stop);
   }
 
   GNUNET_free_non_null (del_arg);
@@ -1635,13 +1680,13 @@ GNUNET_TESTING_daemon_reconfigure (struct GNUNET_TESTING_Daemon *d,
     GNUNET_asprintf (&arg, "%s@%s:%s", d->username, d->hostname, d->cfgfile);
   else
     GNUNET_asprintf (&arg, "%s:%s", d->hostname, d->cfgfile);
-  d->proc = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "scp", "scp",
+  d->proc_arm_copying = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "scp", "scp",
 #if !DEBUG_TESTING
                                      "-q",
 #endif
                                      d->cfgfile, arg, NULL);
   GNUNET_free (arg);
-  if (NULL == d->proc)
+  if (NULL == d->proc_arm_copying)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 _("Could not start `%s' process to copy configuration file.\n"),