diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-19 19:58:29 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-19 19:58:29 -0700 |
commit | 146dea1276fcecb641ee57f080a4d8f2ccce1396 (patch) | |
tree | ee1eef6a2ab73d48cfd34488fe438ee0c94c685b /pym/_emerge/actions.py | |
parent | dfc634ab5f36b6b098bd48651f9a338b473f01e8 (diff) | |
download | portage-146dea1276fcecb641ee57f080a4d8f2ccce1396.tar.gz portage-146dea1276fcecb641ee57f080a4d8f2ccce1396.tar.bz2 portage-146dea1276fcecb641ee57f080a4d8f2ccce1396.zip |
With waitpid and WNOHANG, only check the first element of the tuplev2.2_rc85
since the second element may vary (bug #337465, comment #12).
Diffstat (limited to 'pym/_emerge/actions.py')
-rw-r--r-- | pym/_emerge/actions.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index eb02a0304..92eb18b74 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -2177,7 +2177,10 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): except portage.exception.AlarmSignal: # timed out print('timed out') - if mypids and os.waitpid(mypids[0], os.WNOHANG) == (0,0): + # With waitpid and WNOHANG, only check the + # first element of the tuple since the second + # element may vary (bug #337465). + if mypids and os.waitpid(mypids[0], os.WNOHANG)[0] == 0: os.kill(mypids[0], signal.SIGTERM) os.waitpid(mypids[0], 0) # This is the same code rsync uses for timeout. |