From: Arnaud Giersch Date: Wed, 24 Apr 2019 12:09:23 +0000 (+0200) Subject: Clear the 'on_exit' vector when the actor doesn't have to restart. X-Git-Tag: v3.22.2~54 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/ec2492b4748c7f013c4852f7743ab8707a70ca18?ds=sidebyside Clear the 'on_exit' vector when the actor doesn't have to restart. The python tests actor-kill and actor-daemon were failing. --- diff --git a/src/kernel/actor/ActorImpl.cpp b/src/kernel/actor/ActorImpl.cpp index 86b8b59eff..aec21aae32 100644 --- a/src/kernel/actor/ActorImpl.cpp +++ b/src/kernel/actor/ActorImpl.cpp @@ -143,6 +143,8 @@ void ActorImpl::cleanup() bool failed = context_->iwannadie; for (auto exit_fun = on_exit->crbegin(); exit_fun != on_exit->crend(); ++exit_fun) (*exit_fun)(failed); + if (not has_to_auto_restart()) + on_exit->clear(); /* cancel non-blocking activities */ for (auto activity : comms)