projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2cd7f83
)
SpawnProcess: convert cgroup pids to int earlier
author
Zac Medico
<zmedico@gentoo.org>
Mon, 9 Sep 2013 16:56:49 +0000
(09:56 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Mon, 9 Sep 2013 16:56:49 +0000
(09:56 -0700)
pym/_emerge/SpawnProcess.py
patch
|
blob
|
history
diff --git
a/pym/_emerge/SpawnProcess.py
b/pym/_emerge/SpawnProcess.py
index 6024ef779bcb91d1c9bc75a7b577a580895927d2..b36d15f692e08fc1e4fd9c8165628e21b5217949 100644
(file)
--- a/
pym/_emerge/SpawnProcess.py
+++ b/
pym/_emerge/SpawnProcess.py
@@
-190,7
+190,7
@@
class SpawnProcess(SubProcess):
def get_pids(cgroup):
try:
with open(os.path.join(cgroup, 'cgroup.procs'), 'r') as f:
- return
f.read().split()
+ return
[int(p) for p in f.read().split()]
except OSError:
# cgroup removed already?
return []
@@
-198,7
+198,7
@@
class SpawnProcess(SubProcess):
def kill_all(pids, sig):
for p in pids:
try:
- os.kill(
int(p)
, sig)
+ os.kill(
p
, sig)
except OSError as e:
if e.errno == errno.EPERM:
# Reported with hardened kernel (bug #358211).