MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / sendCkptFilename

Function sendCkptFilename

src/coordinatorapi.cpp:724–753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

722}
723
724void
725sendCkptFilename()
726{
727 // Tell coordinator to record our filename in the restart script
728 string ckptFilename = ProcessInfo::instance().getCkptFilename();
729 string hostname = jalib::Filesystem::GetCurrentHostname();
730 DmtcpMessage msg;
731 if (dmtcp_unique_ckpt_enabled && dmtcp_unique_ckpt_enabled()) {
732 msg.type = DMT_UNIQUE_CKPT_FILENAME;
733 } else {
734 msg.type = DMT_CKPT_FILENAME;
735 }
736 // Tell coordinator type of remote shell command used ssh/rsh
737 string shellType = "";
738 const char *remoteShellType = getenv(ENV_VAR_REMOTE_SHELL_CMD);
739 if (remoteShellType != NULL) {
740 shellType = remoteShellType;
741 }
742 JTRACE("recording filenames") (ckptFilename) (hostname) (shellType);
743
744 size_t buflen = hostname.length() + shellType.length() +
745 ckptFilename.length() + 3;
746 char buf[buflen];
747 strcpy(buf, ckptFilename.c_str());
748 strcpy(&buf[ckptFilename.length() + 1], shellType.c_str());
749 strcpy(&buf[ckptFilename.length() + 1 + shellType.length() + 1],
750 hostname.c_str());
751
752 sendMsgToCoordinator(msg, buf, buflen);
753}
754
755kvdb::KVDBResponse
756kvdbRequest(DmtcpMessage const& msg,

Callers 1

postCheckpointMethod · 0.85

Calls 2

sendMsgToCoordinatorFunction · 0.85

Tested by

no test coverage detected