Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Reverting Mt's modifications. There is a problem in MSG_process_kill. I need to ensur...
[simgrid.git] / src / msg / m_process.c
index 36ed639..813bef2 100644 (file)
@@ -27,7 +27,7 @@ XBT_LOG_NEW_DEFAULT_SUBCATEGORY(m_process, msg,
  * \brief Creates and runs a new #m_process_t.
  *
  * Does exactly the same as #MSG_process_create_with_arguments but without 
-   providing standard arguments (\a argc, \a argv).
+   providing standard arguments (\a argc, \a argv, \a start_time, \a kill_time).
  * \sa MSG_process_create_with_arguments
  */
 m_process_t MSG_process_create(const char *name,
@@ -155,12 +155,17 @@ void MSG_process_kill(m_process_t process)
        surf_workstation_resource->common_public->
          action_change_state(p_simdata->waiting_task->simdata->comm,SURF_ACTION_FAILED);
       else
-       fprintf(stderr,"UNKNOWN STATUS. Please report this bug.\n");
+       CRITICAL0("UNKNOWN STATUS. Please report this bug.");
     } else { /* Must be trying to put a task somewhere */
-      fprintf(stderr,"UNKNOWN STATUS. Please report this bug.\n");
+      if(process==MSG_process_self()) {
+       return;
+      } else {
+       CRITICAL0("UNKNOWN STATUS. Please report this bug.");
+      }
     }
   }
 
+  xbt_fifo_remove(msg_global->process_to_run,process);
   xbt_fifo_remove(msg_global->process_list,process);
   xbt_context_free(process->simdata->context);
 }