Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | _setup_pipes: close unnecessary duplicate fds | Zac Medico | 2013-01-17 | 1 | -9/+46 |
| | |||||
* | SpawnProcess: improve dummy pipe allocation logic | Zac Medico | 2013-01-15 | 1 | -0/+15 |
| | | | | | | | By using allocated file descriptors for keys in fd_pipes, we naturally avoid interference with callers such as FileDigester and MergeProcess. See the _setup_pipes docstring for more benefits of this allocation approach. | ||||
* | spawn: add close_fds parameter | Zac Medico | 2013-01-03 | 1 | -5/+9 |
| | |||||
* | Handle closed sys.__stdin__, for multiprocessing | Zac Medico | 2012-12-15 | 1 | -1/+1 |
| | | | | | | | Buggy code in python's multiprocessing/process.py closes sys.stdin and reassigns it to open(os.devnull), but fails to update the corresponding __stdin__ reference. So, detect that case and handle it appropriately. The buggy code is visible in http://hg.python.org/lookup/r73708. | ||||
* | spawn: setup _exit finally block before fork | Zac Medico | 2012-10-08 | 1 | -17/+26 |
| | | | | This is the most reliable way to handle the race condition. | ||||
* | spawn: use finally block for failure os._exit() | Zac Medico | 2012-10-08 | 1 | -2/+5 |
| | | | | Also, use writemsg for unicode safety. | ||||
* | Use sys.__std*.fileno() in case of overrides. | Zac Medico | 2012-08-22 | 1 | -3/+3 |
| | | | | | This fixes AttributeError exceptions for API consumers that override sys.std* streams pseudo-file objects. | ||||
* | Close fewer file descriptors for fork / no exec. | Zac Medico | 2012-03-27 | 1 | -1/+13 |
| | | | | This will fix bug #374335. | ||||
* | Replace @returns with @return. | Zac Medico | 2012-03-27 | 1 | -2/+2 |
| | |||||
* | get_open_fds: handle EAGAIN for PyPy 1.8 | Zac Medico | 2012-02-15 | 1 | -1/+15 |
| | |||||
* | After python fork, don't close fds for PyPy 1.8. | Zac Medico | 2012-02-14 | 1 | -9/+11 |
| | | | | | | | | | | | | | | | | If we close all open file descriptors after a fork, with PyPy 1.8 it triggers "[Errno 9] Bad file descriptor" later in the subprocess. Apparently it is holding references to file descriptors and closing them after they've already been closed and re-opened for other purposes. As a workaround, we don't close the file descriptors, so that they won't be re-used and therefore we won't be vulnerable to this kind of interference. The obvious caveat of not closing the fds is that the subprocess can hold locks that belonged to the parent process, even after the parent process has released the locks. Hopefully this won't be a major problem though, since the subprocess has to exit at release the lock eventually, when the EbuildFetcher or _MergeProcess task is complete. | ||||
* | spawn: assert that fork returns int type | Zac Medico | 2012-02-06 | 1 | -1/+4 |
| | |||||
* | process._exec: tweak opt_name for PyPy | Zac Medico | 2011-12-01 | 1 | -1/+6 |
| | | | | | PyPy 1.7 will die due to "libary path not found" if argv[0] does not contain the full path of the binary. | ||||
* | _exec: use default SIGINT/TERM handlers | Zac Medico | 2011-01-31 | 1 | -0/+5 |
| | | | | Avoid issues like bug #353239. | ||||
* | _exec: disable SIGQUIT handler override by parent | Zac Medico | 2010-12-28 | 1 | -0/+4 |
| | | | | This will fix bug #289486. | ||||
* | Fix some typos and improve a message in repoman. | Arfrever Frehtes Taifersar Arahesis | 2010-10-23 | 1 | -2/+2 |
| | |||||
* | EbuildFetcher: close uneeded fds in subprocess | Zac Medico | 2010-10-22 | 1 | -16/+19 |
| | |||||
* | With waitpid and WNOHANG, only check the first element of the tuplev2.2_rc85 | Zac Medico | 2010-09-19 | 1 | -2/+8 |
| | | | | since the second element may vary (bug #337465, comment #12). | ||||
* | Remove unused imports found by pylint. | Arfrever Frehtes Taifersar Arahesis | 2010-08-29 | 1 | -2/+1 |
| | |||||
* | Ensure SystemExit is never caught. | Zac Medico | 2010-08-26 | 1 | -0/+2 |
| | |||||
* | Move PORTAGE_PYTHON setting to doebuild_environment() so that it | Zac Medico | 2010-08-14 | 1 | -3/+0 |
| | | | | doesn't pollute os.environ. | ||||
* | Set PORTAGE_PYTHON in processes executed by portage.process._exec(). | Arfrever Frehtes Taifersar Arahesis | 2010-08-14 | 1 | -1/+4 |
| | |||||
* | Remove all svn $Id keywords. | Zac Medico | 2010-03-24 | 1 | -1/+0 |
| | |||||
* | Bug #309001 - Install a SIGPIPE handler inside _exec for all forked processes. | Zac Medico | 2010-03-13 | 1 | -0/+3 |
| | | | | svn path=/main/trunk/; revision=15825 | ||||
* | Make find_binary() use os.environ.get instead of os.getenv, since os.getenv | Zac Medico | 2009-09-21 | 1 | -2/+1 |
| | | | | | | isn't behaving correctly in py3k (maybe a unicode wrapper issue?). svn path=/main/trunk/; revision=14364 | ||||
* | Don't encode the env in py3k since it expects strings for the env that's | Zac Medico | 2009-09-21 | 1 | -13/+9 |
| | | | | | | passed into os.execve(). svn path=/main/trunk/; revision=14363 | ||||
* | Decode all keys in dictionary containing environment passed to os.execve() ↵ | Arfrever Frehtes Taifersar Arahesis | 2009-09-21 | 1 | -1/+7 |
| | | | | | | in portage.process._exec() for compatibility with Python 3. svn path=/main/trunk/; revision=14352 | ||||
* | Use dict.(keys|values|items)() instead of ↵ | Arfrever Frehtes Taifersar Arahesis | 2009-09-21 | 1 | -1/+1 |
| | | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327 | ||||
* | Use range() instead of xrange() for compatibility with Python 3. | Arfrever Frehtes Taifersar Arahesis | 2009-09-21 | 1 | -1/+1 |
| | | | | | | (2to3-3.1 -f xrange -nw ${FILES}) svn path=/main/trunk/; revision=14317 | ||||
* | Define basestring as str when Python 3 is used. | Arfrever Frehtes Taifersar Arahesis | 2009-09-21 | 1 | -0/+3 |
| | | | | svn path=/main/trunk/; revision=14316 | ||||
* | Fix all remaining SyntaxErrors with Python 3. | Arfrever Frehtes Taifersar Arahesis | 2009-09-21 | 1 | -1/+4 |
| | | | | svn path=/main/trunk/; revision=14315 | ||||
* | Update syntax of 'except' statements for compatibility with Python 3. | Arfrever Frehtes Taifersar Arahesis | 2009-09-20 | 1 | -1/+1 |
| | | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289 | ||||
* | Replace _content_encoding, _fs_encoding, and _merge_encoding with direct | Zac Medico | 2009-08-21 | 1 | -3/+3 |
| | | | | | | usage of _encodings. svn path=/main/trunk/; revision=14113 | ||||
* | Update import to import portage.os (with unicode wrappers), and use | Zac Medico | 2009-08-15 | 1 | -6/+5 |
| | | | | | | | _unicode_encode() and _content_encoding for encoding unicode env vars in spawn(). svn path=/main/trunk/; revision=14062 | ||||
* | Show a traceback when spawn() fails. | Zac Medico | 2009-08-12 | 1 | -0/+2 |
| | | | | svn path=/main/trunk/; revision=14005 | ||||
* | Make spawn decode unicode in order to avoid a potential UnicodeEncodeError | Zac Medico | 2009-08-07 | 1 | -0/+11 |
| | | | | | | from os.execve(). svn path=/main/trunk/; revision=13944 | ||||
* | Inside spawn(), avoid redundant os.access() and stat() calls on commonly | Zac Medico | 2009-03-22 | 1 | -1/+2 |
| | | | | | | | spawned binaries such as BASH_BINARY, SANDBOX_BINARY, and FAKEROOT_BINARY. Thanks to Piotr Jaroszyński <peper@g.o> for reporting. svn path=/main/trunk/; revision=13144 | ||||
* | Always use basestring instead of str with isinstance(). | Zac Medico | 2009-03-07 | 1 | -1/+1 |
| | | | | svn path=/main/trunk/; revision=12775 | ||||
* | Use lazyimport to avoid importing the checksum, locks, and util modules | Zac Medico | 2009-02-22 | 1 | -2/+6 |
| | | | | | | when portage is initially imported. svn path=/main/trunk/; revision=12680 | ||||
* | For consistency, make get_open_fds() return a plain iterator in any case, | Zac Medico | 2008-08-15 | 1 | -2/+2 |
| | | | | | | rather than return a list in some cases. svn path=/main/trunk/; revision=11418 | ||||
* | Use a list comprehension instead of strange map() usage which yields odd | Zac Medico | 2008-08-15 | 1 | -1/+2 |
| | | | | | | results when fed to the py3k converter. Thanks to René 'Necoro' Neumann. svn path=/main/trunk/; revision=11417 | ||||
* | In portage.process.spawn(), make the default fd_pipes value get | Zac Medico | 2007-12-21 | 1 | -1/+5 |
| | | | | | | | file descriptors from sys.std{in,out,err} so that they can be overridden. svn path=/main/trunk/; revision=9018 | ||||
* | For bug #186386, pass stdin directly to spawned processes (even when their ↵ | Zac Medico | 2007-07-25 | 1 | -10/+0 |
| | | | | | | output goes through a pty) so that Ctrl+Z works as on would expect.) svn path=/main/trunk/; revision=7394 | ||||
* | Add FEATURES=fakeroot support which causes install and package phases to run ↵ | Zac Medico | 2007-07-23 | 1 | -1/+20 |
| | | | | | | inside fakeroot when a non-root user runs the ebuild command. Thanks to swegener for the initial patch. svn path=/main/trunk/; revision=7379 | ||||
* | Run pychecker over everything, fix obvious thing slike modules not in use, ↵ | Alec Warner | 2007-07-22 | 1 | -2/+4 |
| | | | | | | variables not being used, or global exceptions not being deleted. Also fix imports for style (1 per line) svn path=/main/trunk/; revision=7354 | ||||
* | Fix strange _DevNull instance has no attribute 'isatty' warnings that occur ↵ | Zac Medico | 2007-06-07 | 1 | -1/+1 |
| | | | | | | when epydoc generates docs. svn path=/main/trunk/; revision=6748 | ||||
* | When using a pty for logging, use setsid() to create a new session and make ↵ | Zac Medico | 2007-06-07 | 1 | -3/+20 |
| | | | | | | the pty into the controlling terminal of the new session. This makes interactive ebuild behave properly in interactive cases like check_license() where ${PAGER:-less} is invoked. svn path=/main/trunk/; revision=6747 | ||||
* | Raise a CommandNotFound exception when necessary, to ease troubleshooting. ↵ | Zac Medico | 2007-02-21 | 1 | -2/+2 |
| | | | | | | Thanks to marienz for reporting. svn path=/main/trunk/; revision=6021 | ||||
* | Namespace sanitizing, step 2 | Marius Mauch | 2007-01-25 | 1 | -0/+336 |
Rename portage.exec to portage.process to avoid syntax errors svn path=/main/trunk/; revision=5780 |