On 12/15/06, Linus Torvalds <torvalds@osdl.org> wrote:QProcess implementation is like this FWIK (from qt-x11-free-3.3.4/src/kernel/qprocess_unix.cpp): The SIGCHLD handler writes to a socket to tell the manager that something happened. Then in QProcessManager::sigchldHnd() data is read by process->socketRead( proc->socketStdout ); In QProcess::socketRead() a call to C function read() is done to get 4KB of data: const int basize = 4096; QByteArray *ba = new QByteArray( basize ); n = ::read( fd, ba->data(), basize ); The pointer ba is then appended to a pointer list. This happens _ALWAYS_ indipendently of _how_ the application calls the Qt library for reading. When application read recieved data with QProcess::readStdout(), then data stored in buffers pointed by the pointer list is memcpy() to a temporary array that is the return value of QProcess::readStdout(). See in qt-x11-free-3.3.4/src/kernel/qprocess.cpp: QByteArray QProcess::readStdout() { if ( readStdoutCalled ) { return QByteArray(); } readStdoutCalled = TRUE; QMembuf *buf = membufStdout(); readStdoutCalled = FALSE; return buf->readAll(); // here a memcpy() is involved } So it' true that we use a timeout, but only to trigger a memcpy() from Qt internal library buffers that, instead are feeded as soon as possible by Qt implementation. IOW the timely select() is already done by Qt library. We just read what has been already received and stored. Marco P.S: BTW reading on Qt "data ready" signal is slower the reading on timer. - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.27-rc5 |
| Ingo Molnar | [patch 00/13] Syslets, "Threadlets", generic AIO support, v3 |
| Chris Snook | [PATCH 0/24] make atomic_read() behave consistently across all architectures |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
| Andrew Morton | Re: [Bugme-new] [Bug 9721] New: wake on lan fails with sky2 module |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
git: | |
| Ping Yin | [RFC] git reset --recover |
| Wink Saville | Resolving conflicts |
| Ping Yin | [PATCH 0/7] submodule: fallback to .gitmodules and multiple level module definition |
| Linus Torvalds | Re: git pull for update of netdev fails. |
| Richard Stallman | Real men don't attack straw men |
| Karel Kulhavy | lookup option in /etc/resolv.conf ignored |
| Stefan Beke | mail dovecot: pipe() failed: Too many open files |
| Will | fsck large filesystem, memory limit problem |
| Soft lock bug | 4 hours ago | Linux kernel |
| kernel module to intercept socket creation | 10 hours ago | Linux kernel |
| sysctl - dynamic registration problem | 10 hours ago | Linux kernel |
| Question on swap as ramdisk partition | 12 hours ago | Linux kernel |
| serial driver xmit problem | 17 hours ago | Linux kernel |
| Generic Netlink subsytem | 17 hours ago | Linux kernel |
| 'Report spam filter error' page broken | 19 hours ago | KernelTrap Suggestions and Feedback |
| Netfilter kernel module | 1 day ago | Linux kernel |
| Why Windows is better than Linux | 1 day ago | Linux general |
| How can I see my kernel messages in vt12? | 1 day ago | Linux kernel |
