summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* QProcessPrivate: merge the functions dealing with stdout and stderrThiago Macieira2014-06-121-4/+3
| | | | | | | Simplifies the code. Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Rename QProcessPrivate::destroyChannel to closeChannelThiago Macieira2014-06-121-2/+2
| | | | | | | | | | | The QProcessPrivate::Channel object contains some structures that may survive the closing of the pipe, so calling this function "destroy" is incorrect. Let it be just the closing. For symmetry, the createChannel() function is renamed to openChannel(). Change-Id: I2899214c6e4c25835390b10ccf3931315a91589e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Move the QProcessPrivate Windows objects into QProcessPrivate::ChannelThiago Macieira2014-06-121-3/+9
| | | | | | | Similar to the previous commit, this simplifies the code. Change-Id: Ia02b9b5174b4bc6fd04ec2534231b7db5fc914fa Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Move the QProcessPrivate channel buffers into QProcessPrivate::ChannelThiago Macieira2014-06-121-4/+1
| | | | | | | Simplifies the code. Change-Id: I70b26af69332f364d856042f114c37a70504d66f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* BB select(): move special select method to qcore_unix_p.hPeter Hartmann2014-03-141-0/+5
| | | | | | | | | | | | | | ... and make it independent of QProcess, because we want to use it from QtNetwork as well. In addition, move select_msecs() to qcore_unix_p.h as well and rename it to qt_select_msecs(). Task-number: QTBUG-36144 Change-Id: Ief681b6f6c80e85aa5091a5a04bcedb60f353217 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* add QProcess::InputChannelModeOswald Buddenhagen2013-09-051-0/+1
| | | | | | | | | | | this enables forwarding standard input from the parent process. Change-Id: I7ee72b9842acc96320d4da693b95dd15d9a7b4d4 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
* Fix incomplete override of QIODevice::open in QProcess and QLocalSocketThiago Macieira2013-07-201-0/+1
| | | | | | | | | | | | | | | | | | | The rule for a new override is that it must still work if the old implementation is called. The catch is that any class that derives from QProcess and isn't recompiled will still have QIODevice::open in its virtual table. That is equivalent to overriding open() and calling QIODevice::open() (like the tests). In Qt 5.0, QProcess::start() called QIODevice::open directly, not the virtual open(), so there's no expectation that a user-overridden open() be called. With that in mind, simply fix QProcess::start to not call the virtual open at all. Similarly with QLocalSocket, the calls to open were always non-virtual. Task-number: QTBUG-32284 Change-Id: I88925f0ba08bc23c849658b54582744997e69a4c Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
* restore QProcessEnvironment shared data thread safety on unixOswald Buddenhagen2013-05-201-0/+43
| | | | | | | | | | | | | | | | | implicit sharing together with 'mutable' is a time bomb. we need to protect the nameMap, because concurrent "reads" may try to insert into the hash, which would go boom. we need to protect the key/value of Hash objects, because while the refcounting is atomic, the d pointer assignments are not, which would also go boom. we can simply use a QMutex to protect the whole environment, because it is very cheap in the uncontended case. Task-number: QTBUG-30779 Change-Id: Iaad5720041ca06691d75eb9c6c0e1c120d4a7b46 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* QProcess/Win: drain output pipes on process finishJoerg Bornemann2013-05-071-0/+1
| | | | | | | | | | | | If a process dies before all output is read into the internal buffer of QProcess, we might lose data. Therefore we must drain the output pipes like we already do in the synchronous wait functions. Task-number: QTBUG-30843 Change-Id: I8bbc5265275c9ebd33218ba600267ae87d93ed61 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Enables QProcess back on QNX.Rafael Roquetto2012-02-171-1/+3
| | | | | | | | | | Because fork()/vfork() on QNX are not supported on multithreaded applications, QProcess had been disabled on this platform. The corresponding code has now been replaced with functions that wrap around spawn(). Change-Id: I46091b7d41f322a5cad07d17893aa929c84941ef Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove Symbian specific code from QtCore.Xizhi Zhu2012-01-301-10/+2
| | | | | Change-Id: I131303e28a12dccb96de3de4ca0073b389a9bbae Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* QProcess/Win: use asynchronous I/O for reading stdout and stderrJoerg Bornemann2012-01-261-0/+6
| | | | | | | | This saves us from using the 100 ms polling timer to read process output. Task-number: QTBUG-23012 Change-Id: I3f9398d7a4d30826d2d89ac04bd2fd031500ff57 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Replace implicit QAtomic* casts with explicit load()/store()Bradley T. Hughes2011-10-271-1/+1
| | | | | Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Update licenseheader text in source files for qtbase Qt moduleJyri Tahtela2011-05-241-17/+17
| | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* don't crash in QProcessEnvironment::systemEnvironment()Oswald Buddenhagen2011-05-101-0/+12
| | | | | | | | | as the implementations moved to platform-specific files, the QSharedDataPointer<QProcessEnvironmentPrivate>::detach() specialization needs to go to the private header. Reviewed-by: thiago (cherry picked from commit c79246683a5033f605acd59d1c37d68381383a06)
* fix build on symbianOswald Buddenhagen2011-05-101-62/+60
| | | | | | | | | Error: #793: explicit specialization of class "QTypeInfo<QProcessEnvironmentPrivate::Key>" must precede its first use just un-nest QProcessEnvironmentPrivate::{Key,Value} Reviewed-by: thiago (cherry picked from commit 167044693cc1d16684a5732b05e3926d0af61960)
* make QProcessEnvironment on Unix cache converted valuesOswald Buddenhagen2011-05-101-3/+34
| | | | | | | | | | values are converted between byte arrays and qstrings on demand. this makes it feasible to use the class as a generic environment container with fast reading and writing access. Reviewed-by: thiago Reviewed-by: dt (cherry picked from commit 7aa4ecdedba60ac4cbc07a774ae9d834677002e9)
* make QProcessEnvironment on Unix cache converted variable namesOswald Buddenhagen2011-05-101-5/+35
| | | | | | | | | the converted keys also cache their hash, as they are used only for the purpose of looking up in a qhash. Reviewed-by: thiago Reviewed-by: dt (cherry picked from commit 18f1613aa8ece72d24ac10e28f06e3db1d8ce400)
* move key/value converters to the private classOswald Buddenhagen2011-05-101-0/+10
| | | | | | | | this will enable them to access other members later Reviewed-by: thiago Reviewed-by: dt (cherry picked from commit a2d70d71c8c7652ded41d5d603672c3927df44e6)
* make QProcessEnvironment on Windows preserve variable name caseOswald Buddenhagen2011-05-101-1/+13
| | | | | | | | | | | | | | | | while windows itself does not care which case the variable names are in, they may be passed to unix tools which *do* care. note that this uses true case folding for string comparisons while windows uses uppercasing. this means that "ess" and "eß" will be considered the same by us, while not by windows. this is not expected to have real-world impact, particularly because non-ascii variable names are not used much. Task-number: QTCREATORBUG-3110 Reviewed-by: thiago Reviewed-by: dt (cherry picked from commit f3db5603871928ebed43a085a496397e65952b39)
* split QProcessEnvironmentPrivate::Unit into Key and ValueOswald Buddenhagen2011-05-101-3/+6
| | | | | | Reviewed-by: thiago Reviewed-by: dt (cherry picked from commit 11a79c65ea992be0e2ede7dc8f60660c9190291f)
* Initial import from the monolithic Qt.Qt by Nokia2011-04-271-0/+260
This is the beginning of revision history for this module. If you want to look at revision history older than this, please refer to the Qt Git wiki for how to use Git history grafting. At the time of writing, this wiki is located here: http://qt.gitorious.org/qt/pages/GitIntroductionWithQt If you have already performed the grafting and you don't see any history beyond this commit, try running "git log" with the "--follow" argument. Branched from the monolithic repo, Qt master branch, at commit 896db169ea224deb96c59ce8af800d019de63f12