def check(self): """ Checks whether the kernel support is up-to-date. """ req = rpc.criu_req() req.type = rpc.CHECK resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.cr_errno)
def restore(self): """ Restore a process/tree. """ req = rpc.criu_req() req.type = rpc.RESTORE req.opts.MergeFrom(self.opts) resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.errno) return resp.restore
def dump(self): """ Checkpoint a process/tree identified by opts.pid. """ req = rpc.criu_req() req.type = rpc.DUMP req.opts.MergeFrom(self.opts) resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.cr_errno) return resp.dump