X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/6bddb443489c58ab179610e6ab3f1e4e58c27a58..67634e9178fa9195d4b6fffb61e86ccd81a783d9:/src/msg/msg_process.cpp diff --git a/src/msg/msg_process.cpp b/src/msg/msg_process.cpp index 72f92071b5..cf9b59da86 100644 --- a/src/msg/msg_process.cpp +++ b/src/msg/msg_process.cpp @@ -458,7 +458,7 @@ void MSG_process_on_exit(int_f_pvoid_pvoid_t fun, void *data) { 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. */ @@ -466,4 +466,14 @@ XBT_PUBLIC(msg_process_t) MSG_process_restart(msg_process_t process) { 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()