XBT_PUBLIC(void) MSG_process_auto_restart_set(msg_process_t process, int auto_restart) {
simcall_process_auto_restart_set(process,auto_restart);
}
-/*
+/**
* \ingroup m_process_management
* \brief Restarts a process from the beginning.
*/
return simcall_process_restart(process);
}
+/** @ingroup m_process_management
+ * @brief This process will be terminated automatically when the last non-daemon process finishes
+ */
+XBT_PUBLIC(void) MSG_process_daemonize(msg_process_t process)
+{
+ simgrid::simix::kernelImmediate([process]() {
+ process->daemonize();
+ });
+}
+
SG_END_DECL()