cb (d->cb_cls, NULL, d->cfg, d, _("`scp' did not complete cleanly.\n"));
return;
}
- GNUNET_OS_process_close (d->proc_arm_copying);
+ GNUNET_OS_process_destroy (d->proc_arm_copying);
d->proc_arm_copying = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Successfully copied configuration file.\n");
d->pipe_stdout = 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);
+ GNUNET_OS_process_destroy (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"));
d->pipe_stdout = 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);
+ GNUNET_OS_process_destroy (d->proc_arm_peerinfo);
d->proc_arm_peerinfo = NULL;
d->have_hostkey = GNUNET_YES;
if (d->hostkey_callback != NULL)
if (NULL == d->hostname)
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
- "Starting `%s', with command `%s %s %s %s %s %s'.\n",
- "gnunet-arm", "gnunet-arm", "-c", d->cfgfile, "-L", "DEBUG",
+ "Starting `%s', with command `%s %s %s %s'.\n",
+ "gnunet-arm", "gnunet-arm", "-c", d->cfgfile,
"-s");
d->proc_arm_start =
GNUNET_OS_start_process (GNUNET_YES, NULL, NULL, "gnunet-arm", "gnunet-arm", "-c",
d->cfgfile,
- "-L", "DEBUG",
"-s", "-q", "-T",
GNUNET_TIME_relative_to_string
(GNUNET_TIME_absolute_get_remaining
dst = GNUNET_strdup (d->hostname);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
- "Starting `%s', with command `%s %s %s %s %s %s %s %s'.\n",
+ "Starting `%s', with command `%s %s %s %s %s %s %s'.\n",
"gnunet-arm", "ssh", dst, "gnunet-arm", "-c", d->cfgfile,
- "-L", "DEBUG", "-s", "-q");
+ "-s", "-q");
if (d->ssh_port_str == NULL)
{
d->proc_arm_start = GNUNET_OS_start_process (GNUNET_NO, NULL, NULL, "ssh", "ssh",
d->task =
GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_EXEC_WAIT, &start_fsm,
d);
+ // FIXME: busy wait?
break;
case SP_START_ARMING:
if (GNUNET_OK != GNUNET_OS_process_status (d->proc_arm_start, &type, &code))
}
GNUNET_free_non_null (d->hostname);
GNUNET_free_non_null (d->username);
- GNUNET_free (d->proc_arm_start);
+ GNUNET_OS_process_destroy (d->proc_arm_start);
d->proc_arm_start = NULL;
+ d->username = 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)
d->task =
GNUNET_SCHEDULER_add_delayed (GNUNET_CONSTANTS_EXEC_WAIT, &start_fsm,
d);
+ // FIXME: busy wait?
return;
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Successfully started `%s'.\n",
"gnunet-arm");
- GNUNET_free (d->proc_arm_start);
+ GNUNET_OS_process_destroy (d->proc_arm_start);
d->proc_arm_start = NULL;
d->phase = SP_START_CORE;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Calling CORE_connect\n");
d->phase = SP_START_DONE;
if (NULL != cb)
cb (d->cb_cls, &d->id, d->cfg, d, NULL);
- GNUNET_free (d->proc_arm_srv_start);
+ GNUNET_OS_process_destroy (d->proc_arm_srv_start);
d->proc_arm_srv_start = NULL;
break;
case SP_SERVICE_SHUTDOWN_START:
GNUNET_free_non_null (d->hostname);
GNUNET_free_non_null (d->username);
GNUNET_free_non_null (d->shortname);
- // GNUNET_free_non_null (d->proc); // !? FIXME
- // d->proc_arm_stop = NULL;
+ GNUNET_OS_process_destroy (d->proc_arm_stop);
+ d->proc_arm_stop = NULL;
GNUNET_free (d);
return;
}
GNUNET_free_non_null (d->hostname);
GNUNET_free_non_null (d->username);
GNUNET_free_non_null (d->shortname);
- // GNUNET_free_non_null (d->proc); // !? FIXME!
- // d->proc = NULL; // !? FIXME!
+ GNUNET_OS_process_destroy (d->proc_arm_stop);
+ d->proc_arm_stop = NULL;
GNUNET_free (d);
return;
}
GNUNET_free_non_null (d->hello);
d->hello = NULL;
GNUNET_free_non_null (d->shortname);
- // GNUNET_free_non_null (d->proc); // !? FIXME
- // d->proc = NULL; // !? FIXME!
+ GNUNET_OS_process_destroy (d->proc_arm_stop);
+ d->proc_arm_stop = NULL;
d->shortname = NULL;
if (d->churn == GNUNET_NO)
GNUNET_free (d);
static void
kill_and_close_process (struct GNUNET_OS_Process *proc)
{
- (void) GNUNET_OS_process_kill (proc, SIGKILL);
+ (void) GNUNET_OS_process_kill (proc, SIGKILL);
GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (proc));
- GNUNET_OS_process_close (proc);
+ GNUNET_OS_process_destroy (proc);
}
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! */
+ if ((d->running == GNUNET_NO) && (d->churn == GNUNET_YES))
{
- /* Free what was left from churning! */
+ /* Peer has already been stopped in churn context!
+ * Free what was left from churning! */
GNUNET_assert (d->cfg != NULL);
GNUNET_CONFIGURATION_destroy (d->cfg);
if (delete_files == GNUNET_YES)