projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d0d62ba
)
_exec: avoid UnicodeEncodeError for execve args
author
Zac Medico
<zmedico@gentoo.org>
Sun, 17 Feb 2013 22:12:29 +0000
(14:12 -0800)
committer
Zac Medico
<zmedico@gentoo.org>
Sun, 17 Feb 2013 22:12:29 +0000
(14:12 -0800)
pym/portage/process.py
patch
|
blob
|
history
diff --git
a/pym/portage/process.py
b/pym/portage/process.py
index 89ebd0553fa9832475771d464e507f5cd9a3187a..f00775cf5363654c02e0cb4dda1e04553e9caae7 100644
(file)
--- a/
pym/portage/process.py
+++ b/
pym/portage/process.py
@@
-387,6
+387,10
@@
def _exec(binary, mycommand, opt_name, fd_pipes, env, gid, groups, uid, umask,
myargs = [opt_name]
myargs.extend(mycommand[1:])
+ # Avoid a potential UnicodeEncodeError from os.execve().
+ myargs = [_unicode_encode(x, encoding=_encodings['fs'],
+ errors='strict') for x in myargs]
+
# Use default signal handlers in order to avoid problems
# killing subprocesses as reported in bug #353239.
signal.signal(signal.SIGINT, signal.SIG_DFL)