InstallProgress.waitChild spins if read fails immediately
Bug #53282 reported by
Colin Watson
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-apt (Ubuntu) |
Fix Released
|
Medium
|
Michael Vogt |
Bug Description
def waitChild(self):
while True:
(pid, res) = os.waitpid(
if pid == self.child_pid:
return os.WEXITSTATUS(res)
In the event that the read() in updateInterface immediately returns EAGAIN (and by the way you should refer to that as errno.EAGAIN rather than as the hardcoded 11 and check errno.EWOULDBLOCK as well for compatibility with hppa etc.), then this will spin. select()ing on self.statusfd.
Related branches
Changed in python-apt: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
And, of course, because this file descriptor is non-blocking it spins nearly all the time. I bet fixing this would speed ubiquity's final stages up a fair bit; it would certainly make the strace a lot less noisy!