def wait_pid(self, pid): req = rpc.criu_req() req.type = rpc.WAIT_PID req.pid = pid resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.cr_errno) return resp.status
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 wait_pid(self, pid): req = rpc.criu_req() req.type = rpc.WAIT_PID req.pid = pid resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.cr_errno) return resp.status
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 page_server_chld(self): req = rpc.criu_req() req.type = rpc.PAGE_SERVER_CHLD req.opts.MergeFrom(self.opts) req.keep_open = True resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.cr_errno) return resp.ps
def page_server_chld(self): req = rpc.criu_req() req.type = rpc.PAGE_SERVER_CHLD req.opts.MergeFrom(self.opts) req.keep_open = True resp = self._send_req_and_recv_resp(req) if not resp.success: raise CRIUExceptionExternal(req.type, resp.type, resp.cr_errno) return resp.ps
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.cr_errno) return resp.restore
def pre_dump(self): """ Checkpoint a process/tree identified by opts.pid. """ req = rpc.criu_req() req.type = rpc.PRE_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
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.cr_errno) return resp.restore
def pre_dump(self): """ Checkpoint a process/tree identified by opts.pid. """ req = rpc.criu_req() req.type = rpc.PRE_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