示例#1
0
文件: criu.py 项目: vmandela/criu
    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)
示例#2
0
文件: criu.py 项目: 0x7f454c46/criu-1
	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)
示例#3
0
文件: criu.py 项目: vmandela/criu
    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
示例#4
0
文件: criu.py 项目: vmandela/criu
    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
示例#5
0
文件: criu.py 项目: 0x7f454c46/criu-1
	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
示例#6
0
文件: criu.py 项目: 0x7f454c46/criu-1
	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