XBT_INFO("Kill process"); /* - and then kill it */
MSG_process_kill(poor_victim);
- XBT_INFO("OK, goodbye now.");
+ XBT_INFO("OK, goodbye now. I commit a suicide.");
+ MSG_process_kill(MSG_process_self());
+
+ XBT_INFO("This line will never get displayed: I'm already dead since the previous line.");
return 0;
}
int main(int argc, char *argv[])
{
- msg_error_t res = MSG_OK;
-
MSG_init(&argc, argv);
xbt_assert(argc == 2, "Usage: %s platform_file\n\tExample: %s msg_platform.xml\n", argv[0], argv[0]);
/* - Create and deploy killer process, that will create the victim process */
MSG_process_create("killer", killer, NULL, MSG_host_by_name("Tremblay"));
- res = MSG_main(); /* - Run the simulation */
+ msg_error_t res = MSG_main(); /* - Run the simulation */
XBT_INFO("Simulation time %g", MSG_get_clock());
return res != MSG_OK;