| 1077 | } |
| 1078 | |
| 1079 | void |
| 1080 | DmtcpCoordinator::ResendDoCheckpointMsgToWorker(CoordClient *client) |
| 1081 | { |
| 1082 | JASSERT(workersRunningAndSuspendMsgSent); |
| 1083 | /* Worker trying to connect after SUSPEND message has been sent. |
| 1084 | * This happens if the worker process is executing a fork() or exec() system |
| 1085 | * call when the DMT_DO_SUSPEND is broadcast. We need to make sure that the |
| 1086 | * child process is allowed to participate in the current checkpoint. |
| 1087 | */ |
| 1088 | ComputationStatus s = getStatus(); |
| 1089 | JASSERT(s.numPeers > 0) (s.numPeers); |
| 1090 | JASSERT(s.minimumState != WorkerState::SUSPENDED) (s.minimumState); |
| 1091 | |
| 1092 | JNOTE("Sending DMT_DO_CHECKPOINT msg to worker") (client->identity()); |
| 1093 | |
| 1094 | // Now send DMT_DO_CHECKPOINT message so that this process can also |
| 1095 | // participate in the current checkpoint |
| 1096 | DmtcpMessage suspendMsg(DMT_DO_CHECKPOINT); |
| 1097 | suspendMsg.compGroup = compId; |
| 1098 | client->sock() << suspendMsg; |
| 1099 | } |
| 1100 | |
| 1101 | bool |
| 1102 | DmtcpCoordinator::validateNewWorkerProcess( |