task = self._current_task
if task is None:
break
- if hasattr(task, "reg_id"):
- self.scheduler.schedule(task.reg_id)
task.wait()
return self.returncode
self.wait()
class SubProcess(AsynchronousTask):
- __slots__ = ("pid",)
+ __slots__ = ("pid", "reg_id", "scheduler")
# A file descriptor is required for the scheduler to monitor changes from
# inside a poll() loop. When logging is not enabled, create a pipe just to
def _wait(self):
if self.returncode is not None:
return self.returncode
+ self.scheduler.schedule(self.reg_id)
self._set_returncode(os.waitpid(self.pid, 0))
return self.returncode
"uid", "gid", "groups", "umask", "logfile",
"path_lookup", "pre_exec")
- __slots__ = ("args", "files", "registered", "reg_id", "scheduler") + \
+ __slots__ = ("args", "files", "registered") + \
_spawn_kwarg_names
_file_names = ("process", "out")
class EbuildPhase(SubProcess):
__slots__ = ("fd_pipes", "phase", "pkg",
- "scheduler", "settings", "tree",
- "files", "registered", "reg_id")
+ "settings", "tree",
+ "files", "registered")
_file_names = ("log", "stdout", "ebuild")
_files_dict = slot_dict_class(_file_names, prefix="")