A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[mc] Use existing ModelChecker::shutdown() on ModelChecker::exit().
[simgrid.git]
/
src
/
mc
/
ModelChecker.cpp
diff --git
a/src/mc/ModelChecker.cpp
b/src/mc/ModelChecker.cpp
index
d4ff74e
..
5d4a396
100644
(file)
--- a/
src/mc/ModelChecker.cpp
+++ b/
src/mc/ModelChecker.cpp
@@
-105,11
+105,12
@@
void ModelChecker::shutdown()
{
XBT_DEBUG("Shutting down model-checker");
- RemoteProcess
* process = &this->
get_remote_process();
- if (process
->
running()) {
+ RemoteProcess
& process =
get_remote_process();
+ if (process
.
running()) {
XBT_DEBUG("Killing process");
- kill(process->pid(), SIGKILL);
- process->terminate();
+ // TODO, terminate the model checker politely instead of exiting rudely
+ kill(process.pid(), SIGKILL);
+ process.terminate();
}
}
@@
-240,9
+241,7
@@
bool ModelChecker::handle_message(const char* buffer, ssize_t size)
/** Terminate the model-checker application */
void ModelChecker::exit(int status)
{
- // TODO, terminate the model checker politely instead of exiting rudely
- if (get_remote_process().running())
- kill(get_remote_process().pid(), SIGKILL);
+ shutdown();
::exit(status);
}