- simgrid::surf::StorageImpl* st = findStorageOnMountList(fd->mount());
- XBT_DEBUG("CLOSE %s on disk '%s'", fd->cname(), st->cname());
- return st->close(fd);
+ if (not process_list_.empty()) {
+ for (auto& actor : process_list_) {
+ XBT_DEBUG("Killing Actor %s@%s on behalf of %s which turned off that host.", actor.get_cname(),
+ actor.host_->get_cname(), SIMIX_process_self()->get_cname());
+ SIMIX_process_kill(&actor, SIMIX_process_self());
+ }
+ }
+ // When a host is turned off, we want to keep only the actors that should restart for when it will boot again.
+ // Then get rid of the others.
+ auto elm = actors_at_boot_.begin();
+ while (elm != actors_at_boot_.end()) {
+ if (not elm->second->auto_restart) {
+ delete elm->second;
+ actors_at_boot_.erase(elm);
+ } else
+ ++elm;
+ }