summaryrefslogtreecommitdiffstats
path: root/pym/_emerge/SpawnProcess.py
Commit message (Collapse)AuthorAgeFilesLines
* SpawnProcess: improve dummy pipe allocation logicZac Medico2013-01-151-13/+10
| | | | | | | 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.
* SpawnProcess: avoid fd_pipes interferenceZac Medico2013-01-151-2/+8
| | | | | This fixes a random collision that can occur with FileDigester, triggering malfunction and a KeyError.
* SpawnProcess: handle fcntl ENOTTY for FreeBSDZac Medico2013-01-101-3/+8
|
* SpawnProcess: stdout_fd FD_CLOEXECZac Medico2013-01-071-0/+15
|
* SpawnProcess: support close_fdsZac Medico2013-01-031-2/+2
|
* AsynchronousTask: add _async_wait methodZac Medico2012-12-301-1/+1
| | | | | | | | For cases where _start returns synchronously, this method is a convenient way to trigger an asynchronous call to self.wait() (in order to notify exit listeners), avoiding excessive event loop recursion (or stack overflow) that synchronous calling of exit listeners can cause.
* Handle closed sys.__stdin__, for multiprocessingZac Medico2012-12-151-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.
* SpawnProcess: split out a PipeLogger classZac Medico2012-10-181-131/+34
| | | | | | The copyright dates for these classes begin in 2008, since SpawnProcess code is derived from the EbuildFetcherAsync class which was added in commit e4edadf5ae7063f375d76be151c6d0e949980ecf in 2008.
* PollScheduler: remove register/unregister methodsZac Medico2012-10-051-1/+1
| | | | | | | These methods were aliases for the EventLoop io_add_watch and source_remove methods. Migrating to the EventLoop method names allows an EventLoop instance to substitute for a PollScheduler inside subclasses of AbstractPollTask.
* Optimize sys.std* flush code.v2.2.0_alpha122Zac Medico2012-08-221-2/+3
|
* Use sys.__std*.fileno() in case of overrides.Zac Medico2012-08-221-8/+8
| | | | | This fixes AttributeError exceptions for API consumers that override sys.std* streams pseudo-file objects.
* SpawnProcess: use os.open for /dev/null inputZac Medico2012-02-151-3/+3
|
* SpawnProcess: for stdout use os.write, not fdopenZac Medico2012-02-141-6/+5
|
* AsynchronousTask: skip cancelled check in _startZac Medico2012-02-141-3/+0
| | | | | These checks should be irrelevant, since the cancel() method is never called on anything that hasn't been started already.
* PollScheduler: glib.io_add_watch() compatibilityZac Medico2012-02-071-0/+4
|
* SpawnProcess/AbstractPollTask: eliminate arrayZac Medico2011-12-161-11/+2
| | | | | Since commit 30d2d0a9db486c5a70848ad5d27b37a3ec48f271, we use os.read() due to bugs in array.fromfile(). So, eliminate array usage entirely.
* SpawnProcess: remove obsolete fdopenZac Medico2011-12-161-4/+2
| | | | | Since commit 30d2d0a9db486c5a70848ad5d27b37a3ec48f271, we use os.read() due to bugs in array.fromfile(), so there's no need to use fdopen.
* SpawnProcess: work around array.fromfile() bugsZac Medico2011-12-151-11/+20
| | | | | | When I extended test_poll to test SpawnProcess array.fromfile() usage, it exposed bugs in array.fromfile() that I couldn't find a way to handle. So, use os.read() instead.
* SpawnProcess: use /dev/null fd from subclassZac Medico2011-12-131-14/+17
|
* python3.2 fixes: ResourceWarning: unclosed fileZac Medico2011-08-251-1/+8
|
* Add some comments, which will allow to easier find code, which should beArfrever Frehtes Taifersar Arahesis2011-08-251-0/+1
| | | | removed when support for older versions of Python is removed.
* python3.2 fixes: use array.tobytes()Zac Medico2011-08-241-1/+5
|
* BinpkgFetcher: support selinux PORTAGE_FETCH_TZac Medico2011-07-211-2/+12
| | | | | Thanks to Sven Vermeulen <sven.vermeulen@siphos.be> for the initial patch posted on bug #375835.
* SpawnProcess: read proc with unbuffered fdopenZac Medico2011-01-201-2/+4
| | | | | This enables pty support in python3, by using unbuffered fdopen to avoid http://bugs.python.org/issue5380.
* Split out a AbstractPollTask._read_buf() helper method.Zac Medico2010-09-091-16/+6
|
* Bug #324191 - Add support for FEATURES=compress-build-logs. The causesZac Medico2010-08-211-2/+14
| | | | | | | all build logs to be compressed while they are being written. Log file names have an extension that is appropriate for the compression type. Currently, only gzip(1) compression is supported, so build logs will have a '.gz' extension when this feature is enabled.
* Fix SubProcess instances to call _set_returncode() when appropriate,Zac Medico2010-08-151-1/+1
| | | | instead of setting self.returncode directly.
* Remove unuser return values from PollScheduler event handlers.Zac Medico2010-08-151-2/+0
|
* EOFError can still be raised by array.fromfile() in Python >=2.6.6 and >=2.7.1.Arfrever Frehtes Taifersar Arahesis2010-08-051-2/+0
|
* Bug #330937: Handle IOError raised by remaining calls to array.fromfile().Arfrever Frehtes Taifersar Arahesis2010-08-051-1/+2
|
* Bug #330937: Handle IOError raised by array.fromfile().Arfrever Frehtes Taifersar Arahesis2010-08-031-1/+2
|
* Remove all svn $Id keywords.Zac Medico2010-03-241-1/+0
|
* Bug #162404 - Automatically disable logging if sesandbox is enabled and aZac Medico2009-12-051-1/+7
| | | | | | | pty is not available for some reason (currently they are never available with python3). svn path=/main/trunk/; revision=14928
* Use dict.(keys|values|items)() instead of ↵Arfrever Frehtes Taifersar Arahesis2009-09-211-1/+1
| | | | | | | | dict.(iterkeys|itervalues|iteritems)() for compatibility with Python 3. (2to3-3.1 -f dict -nw ${FILES}) svn path=/main/trunk/; revision=14327
* Update syntax of numbers for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-1/+1
| | | | | | (2to3-3.1 -f numliterals -nw ${FILES}) svn path=/main/trunk/; revision=14292
* Update syntax of 'except' statements for compatibility with Python 3.Arfrever Frehtes Taifersar Arahesis2009-09-201-1/+1
| | | | | | (2to3-3.1 -f except -nw ${FILES}) svn path=/main/trunk/; revision=14289
* Update imports to import portage.os (with unicode wrappers), and useZac Medico2009-08-111-8/+3
| | | | | | _unicode_encode() and _unicode_decode() where appropriate. svn path=/main/trunk/; revision=13994
* Add/update copyright headers.Zac Medico2009-06-251-0/+4
| | | | svn path=/main/trunk/; revision=13690
* Bug #275047 - Split _emerge/__init__.py into smaller pieces. Thanks toZac Medico2009-06-221-0/+219
Sebastian Mingramm (few) <s.mingramm@gmx.de> for this patch. svn path=/main/trunk/; revision=13663