本文整理汇总了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()