| 722 | } |
| 723 | |
| 724 | void |
| 725 | sendCkptFilename() |
| 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 | |
| 755 | kvdb::KVDBResponse |
| 756 | kvdbRequest(DmtcpMessage const& msg, |
no test coverage detected