+ sg_actor_sleep_for(1);
+}
+static void actorB_fun(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
+{
+ sg_actor_sleep_for(2);
+}
+static int C_on_exit(int failed, XBT_ATTRIB_UNUSED void* ignored2)
+{
+ if (failed) {
+ XBT_INFO("I was killed!");
+ if (xbt_log_no_loc)
+ XBT_INFO("The backtrace would be displayed here if --log=no_loc would not have been passed");
+ else
+ xbt_backtrace_display_current();
+ } else
+ XBT_INFO("Exiting gracefully.");
+ return 0;
+}
+static void actorC_fun(XBT_ATTRIB_UNUSED int argc, XBT_ATTRIB_UNUSED char* argv[])
+{
+ // Register a lambda function to be executed once it stops
+ sg_actor_on_exit(&C_on_exit, NULL);
+
+ sg_actor_sleep_for(3);
+ XBT_INFO("And now, induce a deadlock by waiting for a message that will never come\n\n");
+ sg_mailbox_get(sg_mailbox_by_name("nobody"));
+ xbt_die("Receiving is not supposed to succeed when nobody is sending");