From: Christophe ThiƩry Date: Fri, 14 Oct 2011 15:54:51 +0000 (+0200) Subject: Now that processes are terminated cleanly, this recv can fail X-Git-Tag: exp_20120216~558^2~4 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/3048f34c0542db89e3f6ebc66ad9fce8999879c1 Now that processes are terminated cleanly, this recv can fail --- diff --git a/examples/msg/actions/actions.c b/examples/msg/actions/actions.c index a45db1fd84..ca75da4b3e 100644 --- a/examples/msg/actions/actions.c +++ b/examples/msg/actions/actions.c @@ -137,10 +137,13 @@ static void action_recv(const char *const *action) #endif XBT_DEBUG("Receiving: %s", name); - MSG_task_receive(&task, mailbox_name); + MSG_error_t res = MSG_task_receive(&task, mailbox_name); // MSG_task_receive(&task, MSG_process_get_name(MSG_process_self())); XBT_VERB("%s %f", name, MSG_get_clock() - clock); - MSG_task_destroy(task); + + if (res == MSG_OK) { + MSG_task_destroy(task); + } if (XBT_LOG_ISENABLED(actions, xbt_log_priority_verbose)) free(name);