handling replies continuously from server
[oweals/gnunet.git] / src / util / os_priority.c
index 868268b10a2392bb6035d2382d2c853ab99b36d7..9def6ca54d899cd0b59920a2afc54090f6ec9b10 100644 (file)
@@ -486,8 +486,13 @@ GNUNET_OS_process_get_pid (struct GNUNET_OS_Process * proc)
 }
 
 
+/**
+ * Cleans up process structure contents (OS-dependent) and deallocates it
+ *
+ * @param proc pointer to process structure
+ */
 void
-GNUNET_OS_process_close (struct GNUNET_OS_Process *proc)
+GNUNET_OS_process_destroy (struct GNUNET_OS_Process *proc)
 {
   if (NULL != proc->control_pipe)
     GNUNET_DISK_file_close (proc->control_pipe);
@@ -644,10 +649,15 @@ GNUNET_OS_set_process_priority (struct GNUNET_OS_Process *proc,
 static char *
 CreateCustomEnvTable (char **vars)
 {
-  char *win32_env_table, *ptr, **var_ptr, *result, *result_ptr;
+  char *win32_env_table;
+  char *ptr;
+  char **var_ptr;
+  char *result;
+  char *result_ptr;
   size_t tablesize = 0;
   size_t items_count = 0;
-  size_t n_found = 0, n_var;
+  size_t n_found = 0;
+  size_t n_var;
   char *index = NULL;
   size_t c;
   size_t var_len;
@@ -1499,7 +1509,9 @@ GNUNET_OS_start_process_v (int pipe_control,
 
 
 /**
- * Retrieve the status of a process
+ * Retrieve the status of a process, waiting on him if dead.
+ * Nonblocking version.
+ * 
  * @param proc process ID
  * @param type status type
  * @param code return code/signal number
@@ -1716,7 +1728,7 @@ GNUNET_OS_command_stop (struct GNUNET_OS_CommandHandle *cmd)
   }
   (void) GNUNET_OS_process_kill (cmd->eip, SIGKILL);
   GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (cmd->eip));
-  GNUNET_OS_process_close (cmd->eip);
+  GNUNET_OS_process_destroy (cmd->eip);
   GNUNET_DISK_pipe_close (cmd->opipe);
   GNUNET_free (cmd);
 }