当前位置: 首页>>代码示例>>Python>>正文


Python SpawnProcess._async_waitpid_cb方法代码示例

本文整理汇总了Python中_emerge.SpawnProcess.SpawnProcess._async_waitpid_cb方法的典型用法代码示例。如果您正苦于以下问题:Python SpawnProcess._async_waitpid_cb方法的具体用法?Python SpawnProcess._async_waitpid_cb怎么用?Python SpawnProcess._async_waitpid_cb使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在_emerge.SpawnProcess.SpawnProcess的用法示例。


在下文中一共展示了SpawnProcess._async_waitpid_cb方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _async_waitpid_cb

# 需要导入模块: from _emerge.SpawnProcess import SpawnProcess [as 别名]
# 或者: from _emerge.SpawnProcess.SpawnProcess import _async_waitpid_cb [as 别名]
	def _async_waitpid_cb(self, *args, **kwargs):
		"""
		Override _async_waitpid_cb to perform cleanup that is
		not necessarily idempotent.
		"""
		SpawnProcess._async_waitpid_cb(self, *args, **kwargs)

		if self._exit_timeout_id is not None:
			self._exit_timeout_id.cancel()
			self._exit_timeout_id = None

		if self._ipc_daemon is not None:
			self._ipc_daemon.cancel()
			if self._exit_command.exitcode is not None:
				self.returncode = self._exit_command.exitcode
			else:
				if self.returncode < 0:
					if not self.cancelled:
						self._killed_by_signal(-self.returncode)
				else:
					self.returncode = 1
					if not self.cancelled:
						self._unexpected_exit()

		elif not self.cancelled:
			exit_file = self.settings.get('PORTAGE_EBUILD_EXIT_FILE')
			if exit_file and not os.path.exists(exit_file):
				if self.returncode < 0:
					if not self.cancelled:
						self._killed_by_signal(-self.returncode)
				else:
					self.returncode = 1
					if not self.cancelled:
						self._unexpected_exit()
开发者ID:gentoo,项目名称:portage,代码行数:36,代码来源:AbstractEbuildProcess.py


注:本文中的_emerge.SpawnProcess.SpawnProcess._async_waitpid_cb方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。