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
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git]
/
src
/
mc
/
remote
/
CheckerSide.hpp
diff --git
a/src/mc/remote/CheckerSide.hpp
b/src/mc/remote/CheckerSide.hpp
index 17fb33c3c4e8032a98407518074bc7ab995ff5d0..a3cb6a6eda148df545841aa6e052b0af1e467a95 100644
(file)
--- a/
src/mc/remote/CheckerSide.hpp
+++ b/
src/mc/remote/CheckerSide.hpp
@@
-26,12
+26,17
@@
class CheckerSide {
Channel channel_;
bool running_ = false;
pid_t pid_;
Channel channel_;
bool running_ = false;
pid_t pid_;
+ // When forking (no meminfo), the real app is our grandchild. In this case,
+ // child_checker_ is a CheckerSide to our child that can waitpid our grandchild on our behalf
+ CheckerSide* child_checker_ = nullptr;
- void setup_events(); // Part of the initialization
+ void setup_events(
bool socket_only
); // Part of the initialization
void clear_memory_cache();
void clear_memory_cache();
- void handle_waitpid();
+ void handle_dead_child(int status); // Launched when the dying child is the PID we follow
+ void handle_waitpid(); // Launched when receiving a sigchild
public:
public:
+ explicit CheckerSide(int socket, CheckerSide* child_checker);
explicit CheckerSide(const std::vector<char*>& args, bool need_memory_introspection);
~CheckerSide();
explicit CheckerSide(const std::vector<char*>& args, bool need_memory_introspection);
~CheckerSide();
@@
-49,6
+54,9
@@
public:
void break_loop() const;
void wait_for_requests();
void break_loop() const;
void wait_for_requests();
+ /* Create a new CheckerSide by forking the currently existing one, and connect it through the master_socket */
+ std::unique_ptr<CheckerSide> clone(int master_socket);
+
/** Ask the application to run post-mortem analysis, and maybe to stop ASAP */
void finalize(bool terminate_asap = false);
/** Ask the application to run post-mortem analysis, and maybe to stop ASAP */
void finalize(bool terminate_asap = false);