double kill_time = 0.0;
std::shared_ptr<std::unordered_map<std::string, std::string>> properties = nullptr;
bool auto_restart = false;
+ bool daemon_ = false;
ProcessArg() = default;
explicit ProcessArg(std::string name, std::function<void()> code, void* data, s4u::Host* host, double kill_time,
, host(host)
, kill_time(SIMIX_timer_get_date(actor->kill_timer))
, auto_restart(actor->auto_restart_)
+ , daemon_(actor->is_daemon())
{
properties.reset(actor->get_properties(), [](decltype(actor->get_properties())) {});
}
arg->properties.get(), nullptr);
if (arg->kill_time >= 0)
simcall_process_set_kill_time(actor, arg->kill_time);
- if (arg->auto_restart)
- actor->auto_restart_ = arg->auto_restart;
+ if (arg->daemon_)
+ actor->daemonize();
}
}
+
/** Kill all actors hosted here */
void HostImpl::turn_off()
{