summaryrefslogtreecommitdiffstats
path: root/bin/ebuild-ipc.py
Commit message (Collapse)AuthorAgeFilesLines
* ebuild-ipc: import errnoZac Medico2011-03-171-0/+1
|
* ebuild-ipc: use non-blocking readZac Medico2011-03-171-13/+41
| | | | | | | | | | | | This makes it possible for the daemon to send a reply without blocking, thereby improving performance and also making it possible for the daemon to do a non-blocking write without a race condition. This reverts part of commit 81fc303212b8379219cf5d463c8717359b972dba, which probably didn't help portability anyway. Now, ebuild-ipc is using non-blocking read with os.read and EAGAIN handling, just like EbuildIpcDaemon since commit 7e5b81da12dd7bd59f6620840dc0d824e3f4d69a (known compatible with FreeBSD).
* ebuild-ipc: use plain file read instead of arrayZac Medico2011-03-101-9/+6
| | | | | Array.fromfile() seems to be more error prone. For example, see bug 337465.
* In EbuildIpc._receive_reply(), close the input_file when finished.v2.2_rc86Zac Medico2010-09-211-0/+2
|
* In EbuildIpc._wait(), use waitpid() instead of wait() since we reallyZac Medico2010-09-211-1/+1
| | | | only need to wait on one process.
* Bug #337465 - Make ebuild-ipc use an array in order to force aZac Medico2010-09-211-3/+16
| | | | single atomic read of a whole pickle.
* Make ebuild-ipc use select() for timeouts, instead of alarm signals.Zac Medico2010-09-211-29/+44
|
* Make ebuild-ipc use a normal read() call instead of array.fromfile()Zac Medico2010-09-201-13/+3
| | | | since that should work fine for blocking IO.
* Make ebuild-ipc kill the child IO process before it exits due to timeout.Zac Medico2010-09-201-1/+8
|
* Fix ebuild-ipc to correctly handle non-zero return codes fromZac Medico2010-09-201-4/+8
| | | | has_version ipc calls.
* Rewrite ebuild-ipc timeout handling to use forks.Zac Medico2010-09-201-62/+85
| | | | | | | Use forks so that the child process can handle blocking IO un-interrupted, while the parent handles all timeout considerations. This helps to avoid possible race conditions from interference between timeouts and blocking IO operations.
* Make ebuild-ipc show an additional 'read failed' message if the bufferZac Medico2010-09-201-1/+8
| | | | happens to be empty after the read loop.
* If ebuild-ipc times out during read, check if the read buffer isZac Medico2010-09-201-2/+4
| | | | non-empty in order to try to avoid a possible race condition.
* Fix ebuild-ipc.py to timeout if necessary when opening input_fileZac Medico2010-09-181-2/+8
| | | | in blocking mode.
* Use blocking IO in ebuild-ipc.py and EbuildIpcDaemon._send_reply(),Zac Medico2010-09-181-17/+1
| | | | in hopes that it will be more portable (see bug #337465).
* Make ebuild-ipc.py close the output_file before trying to re-open itZac Medico2010-09-141-2/+6
| | | | after it has timed out.
* Make ebuild-ipc timeout messages show which operation timed out.Zac Medico2010-09-141-6/+11
|
* Bug #336142 - Make ebuild-ipc.py keep trying to communicate indefinitely,Zac Medico2010-09-141-36/+98
| | | | as long as $PORTAGE_BUILDDIR is locked.
* Bug #336142 - Use a longer timeout for ebuild-ipc, in case the system isZac Medico2010-09-121-1/+3
| | | | heavily loaded.
* Make ebuild-ipc.py suppress IOError just like it does for EOFErrorZac Medico2010-09-101-3/+1
| | | | when the buffer is non-empty.
* Make ebuild-ipc.py handle exceptions from pickle.loads().Zac Medico2010-09-101-11/+15
|
* Make ebuild-ipc.py display EOFError if no data is read from theZac Medico2010-09-101-2/+2
| | | | pipe.
* Add missing comma in tuple.Zac Medico2010-09-091-2/+2
|
* Bug #336644 - Make ebuild-ipc.py use array.fromfile() to read picklesZac Medico2010-09-091-25/+29
| | | | | | | in single atomic non-blocking read() calls, similar to how AbstractPollTask._read_buf() does it. If the read fails, exit with status 2 so that best_version() and has_version() can detect the error and die when necessary.
* Make ebuild-ipc.py call portage._disable_legacy_globals() since itZac Medico2010-09-031-0/+1
| | | | doesn't need any of that stuff.
* Adjust AlarmSignal.unregister() call in ebuild-ipc.Zac Medico2010-09-031-7/+8
|
* Make AlarmSignal.register() require a time parameter and pass it toZac Medico2010-09-031-2/+2
| | | | signal.alarm().
* Add AlarmSignal.register() and unregister() classmethods in order toZac Medico2010-09-031-3/+2
| | | | handle interaction with the signal module.
* Bug #335777 - Add a 40 second timeout in ebuild-ipc.py, so that if anZac Medico2010-09-031-1/+20
| | | | | orphan is left for any reason then it will exit with an error message instead of hanging indefinitely.
* Adjust EbuildIpcDaemon pickle read and write code in order to ensureZac Medico2010-09-021-4/+26
| | | | | atomc reading and writing of whole pickles. This should be the least error-prone approach, given the non-blocking nature of the streams.
* Fix typo in comment.Zac Medico2010-08-201-1/+1
|
* Add a SIGUSR1 handler to trigger pdb.set_trace().Zac Medico2010-08-131-0/+6
|
* Clean up a bit.Zac Medico2010-08-121-6/+3
|
* Make IpcDaemonTestCase demonstrate an EbuildIpcDaemon basedZac Medico2010-08-121-9/+8
| | | | replacement for EBUILD_EXIT_STATUS_FILE.
* Make locks quiet since unintended locking messages displayed onZac Medico2010-08-121-0/+3
| | | | stdout could corrupt the intended output of this program.
* Add some pieces of an IPC framework that will eventually allow ebuildZac Medico2010-08-121-0/+71
processes can to communicate with portage's main python process. Here are a few possible uses: 1) Robust subshell/subprocess die support. This allows the ebuild environment to reliably die without having to rely on signal IPC. 2) Delegation of portageq calls to the main python process, eliminating performance and userpriv permission issues. 3) Reliable ebuild termination in cases when the ebuild has accidentally left orphan processes running in the backgraound (as in bug 278895).