const char *hostname,
double kill_time,
int argc, char **argv,
- xbt_dict_t properties)
+ xbt_dict_t properties,
+ int auto_restart)
{
smx_simcall_t simcall = SIMIX_simcall_mine();
simcall->process_create.argc = argc;
simcall->process_create.argv = argv;
simcall->process_create.properties = properties;
+ simcall->process_create.auto_restart = auto_restart;
SIMIX_simcall_push(simcall->issuer);
}
/**
* \brief Set the kill time of a process.
- *
* \param process a process
* \param kill_time a double
*/
SIMIX_simcall_push(simcall->issuer);
return simcall->process_get_properties.result;
}
-/** \ingroup m_process_management
+/**
* \brief Add an on_exit function
* Add an on_exit function which will be executed when the process exits/is killed.
*/
SIMIX_simcall_push(simcall->issuer);
}
+/**
+ * \brief Sets the process to be auto-restarted or not by SIMIX when its host comes back up.
+ * Will restart the process when the host comes back up if auto_restart is set to 1.
+ */
+
+XBT_PUBLIC(void) simcall_process_auto_restart_set(smx_process_t process, int auto_restart) {
+ smx_simcall_t simcall = SIMIX_simcall_mine();
+
+ simcall->call = SIMCALL_PROCESS_AUTO_RESTART_SET;
+ simcall->process_auto_restart.process = process;
+ simcall->process_auto_restart.auto_restart = auto_restart;
+
+ SIMIX_simcall_push(simcall->issuer);
+}
/** \brief Creates a new sleep SIMIX action.
*
* This function creates a SURF action and allocates the data necessary