From: Samuel Lepetit Date: Thu, 21 Jun 2012 08:44:38 +0000 (+0200) Subject: Fix bug #14412 (Killing a SIMIX process just after migrate won't work) X-Git-Tag: v3_8~531 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/0bb6320010513753371f2ff4c910eab6ce5fa31c Fix bug #14412 (Killing a SIMIX process just after migrate won't work) --- diff --git a/examples/msg/cloud/masterslave_virtual_machines.c b/examples/msg/cloud/masterslave_virtual_machines.c index ed1ac279b6..2ed5704d44 100644 --- a/examples/msg/cloud/masterslave_virtual_machines.c +++ b/examples/msg/cloud/masterslave_virtual_machines.c @@ -99,6 +99,8 @@ int master(int argc, char *argv[]) { MSG_vm_bind(vm, MSG_process_create_with_arguments(slavename,slave_fun,NULL,slaves[i],2,argv)); } + work_batch(slaves_count*2); + XBT_INFO("Migrate everyone to the second host."); for (i=0;iname); + if (self->new_host) { + SIMIX_process_change_host(self, self->new_host); + self->new_host = NULL; + } + if (self->context->iwannadie){ XBT_DEBUG("I wanna die!"); SIMIX_context_stop(self->context); @@ -654,11 +659,6 @@ void SIMIX_process_yield(smx_process_t self) self->doexception = 0; SMX_THROW(); } - - if (self->new_host) { - SIMIX_process_change_host(self, self->new_host); - self->new_host = NULL; - } } /* callback: context fetching */