- XBT_INFO("Worker booting");
- sg4::this_actor::on_exit(
- [id](bool forcefully) { XBT_INFO("worker %d dying %s.", id, forcefully ? "forcefully" : "peacefully"); });
+ bool rebooting = sg4::Actor::self()->get_restart_count() > 0;
+
+ XBT_INFO("Worker %s", rebooting ? "rebooting" : "booting");
+ if (not rebooting) // Starting for the first time
+ sg4::this_actor::on_exit(
+ [id](bool forcefully) { XBT_INFO("worker %d dying %s.", id, forcefully ? "forcefully" : "peacefully"); });