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

Function prepareLogAndProcessdDataFromSerialFile

src/dmtcpworker.cpp:146–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

144}
145
146static void
147prepareLogAndProcessdDataFromSerialFile()
148{
149 if (Util::isValidFd(PROTECTED_LIFEBOAT_FD)) {
150 jalib::JBinarySerializeReaderRaw rd("", PROTECTED_LIFEBOAT_FD);
151 rd.rewind();
152 UniquePid::serialize(rd);
153
154 DmtcpEventData_t edata;
155 edata.postExec.serializationFd = PROTECTED_LIFEBOAT_FD;
156 PluginManager::eventHook(DMTCP_EVENT_POST_EXEC, &edata);
157 _real_close(PROTECTED_LIFEBOAT_FD);
158 } else {
159 // Brand new process (was never under ckpt-control),
160
161 // Initialize the log file
162 Util::initializeLogFile(SharedData::getTmpDir());
163
164 JTRACE("Root of processes tree");
165 ProcessInfo::instance().isRootOfProcessTree = 1;
166 }
167}
168
169static void
170segFaultHandler(int sig, siginfo_t *siginfo, void *context)

Callers 1

Calls 3

eventHookFunction · 0.85
rewindMethod · 0.80
_real_closeFunction · 0.70

Tested by

no test coverage detected