summaryrefslogtreecommitdiffstats
path: root/src/corelib/io/qprocess_unix.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Core: Consolidate QProcess error reportingKai Koehne2015-06-201-26/+11
| | | | | | | | | Introduce two methods to set set error and errorString, and optionally emit the error() signal. This also fixes two places where errorString hasn't been set previously. Change-Id: Ib7c27ff2daff898745e8e20ff8f11eaae568697f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Fix crashes when accessing environment variables concurrentlySimon Hausmann2015-04-301-2/+2
| | | | | | | | | | | | | | We've seen crashes with QThreadPrivate::start using qgetenv during the creation of the event dispatcher, while another thread (for example the gui thread) called qputenv. This is inherently thread-unsafe and there are many places where we make the assumption that using the environment is safe. However access to the environment is inherently unsafe in the C runtime and the best that we can do is add a mutex around the Qt environment access functions, to at least protect ourselves and our users. Change-Id: Ie9a718d9f7ce63c423c645f0be3e3f4933e1cb08 Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into devLiang Qi2015-04-221-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/statemachine/qstatemachine.cpp src/corelib/statemachine/qstatemachine_p.h src/gui/painting/qdrawhelper.cpp src/plugins/platforms/xcb/qxcbnativeinterface.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/plugins/platforms/xcb/qxcbwindow.h src/testlib/qtestblacklist.cpp src/tools/qdoc/node.cpp src/tools/qdoc/node.h tests/auto/gui/painting/qcolor/tst_qcolor.cpp Change-Id: I6c78b7b162001712d5774293f501b06b4ff32684
| * remove the "wonderful Windows notifier" from QProcessJoerg Bornemann2015-04-131-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the 100 ms timer that was used to nudge QProcess to write data to the child's stdin. Instead, react on the canWrite() signal of QWindowsPipeWriter. QProcess::writeData needs to call _q_canWrite via the event loop to start the write operation. The socket notifier code was never in use on Windows. Task-number: QTBUG-45457 Change-Id: I99c956ba5f2169f80068eee206543ceb9788b2e0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | Remove <qhash.h> where it's not usedMarc Mutz2015-04-201-1/+0
|/ | | | | | | | To avoid source-incompatibilites, wrap in QT_DEPRECATED_SINCE(5, 5) in public headers. Change-Id: I6117e8a6b11200d2f1a0a94a0e87d5c27538218e Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Remove special handling for (DY)LD_LIBRARY_PATH in QProcess.Jake Petroules2015-04-081-15/+0
| | | | | | | | | | | | | | | | | | | This provides the ability to pass a *real* clear environment to a QProcess, rather than (DY)LD_LIBRARY_PATH always being copied over from the current environment behind-the-scenes. This is important to users because passing a truly clear environment is now possible. [ChangeLog][Important Behavior Changes] (DY)LD_LIBRARY_PATH will no longer "stick" in the process environment when starting a QProcess. This means that if a QProcess is started with a clear environment, it will not specially inherit (DY)LD_LIBRARY_PATH from the parent process. This should not affect most applications, but if the old behavior is desired, one can simply pass a clear QProcessEnvironment with the (DY)LD_LIBRARY_PATH values added, to the QProcess. Change-Id: I51d1bc14905c5cc126fb02d91dddc2faade41a3c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.4' into 5.5Liang Qi2015-03-311-16/+3
|\ | | | | | | | | | | | | | | | | Conflicts: mkspecs/android-g++/qmake.conf qmake/generators/unix/unixmake2.cpp src/gui/image/qimage_conversions.cpp Change-Id: Ib76264b8c2d29a0228438ec02bd97d4b97545be0
| * Introduce qt_subtract_from_timeout to reduce code duplication.Daniel Teske2015-03-091-16/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The same qt_timeout_value function was copied 5 times in qtbase's code, so provide a common implementation in QIoDevice that can be used by everyone. This commit also corrects the remaining time calculation in QProcess::waitForBytesWritten and QProcess::waitForFinished by using this new function. For QProcess::waitForFinished, if the process started within almost exactly the timeout time passed to waitForFinished, msecs - stopWatch.elapsed() would be -1, which is a special value. Change-Id: I7b76ee6bae695eafdd02e3db03e2ff1e23a7f40c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* | QProcess: remove a use of QString::sprintf()Marc Mutz2015-02-121-6/+11
| | | | | | | | | | | | | | | | Instead of using QString::sprintf() (and converting the result back to QByteArray), simply do the conversion from uchar to octal digits ourselves, using QtMiscTools. Change-Id: I452c085b717c71609cd1a9465e31d90e6a0ba54b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* | QProcess: fix warnings with QPROCESS_DEBUG definedMarc Mutz2015-02-021-2/+2
| | | | | | | | | | | | | | | | | | The warnings were: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=] (2x) Change-Id: If8c2e8fab7388cb4aa7d6e7ceb5faee531e16006 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | QNX: QProcess workaround for the stdin pipeRafael Roquetto2015-01-231-3/+37
| | | | | | | | | | | | | | | | | | | | | | | | Due to a bug in the internal implementation of posix_spawnp on QNX, all file descriptors with a value lower than the maximum file descriptor specified in the file_actions structure are duplicated by default, ignoring the FD_CLOEXEC flag. This includes all file descriptors that we are not working with. So we add those file descriptors that have the FD_CLOEXEC flag to the file_actions structure as close actions. Change-Id: I316bc334addb46a4b84c199a69e9bd291ca706c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Use forkfd in QProcessThiago Macieira2015-01-231-372/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace the existing code in QProcess that dealt with signaling of child processes exiting with forkfd and spawnfd. The previous code was convoluted and hard to maintain, having shown its age in the last year. I've been running it for a year and a half and the new implementation is definitely an improvement. This change replaces support for the QNX Neutrino spawn() call with the POSIX version. We lose the ability to do setsid(), but we gain quite a few ioctls() that were done to fill in the file descriptor mapping structure. That's also the only OS for which we have the ability to thread-safely chdir() before the call to spawnfd(). Another advantage is that forkfd does not require a dedicated thread running to handle child processes exiting. Change-Id: I5eb76821dfdb6a8ed2989d7f53b3c31e515c3174 Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* | Add Q_DECL_OVERRIDE in the src subdirectoryOlivier Goffart2014-12-031-1/+1
|/ | | | | | | | | | Done automatically with clang-modernize on linux (But does not add Q_DECL_OVERRIDE to the function that are marked as inline because it a compilation error with MSVC2010) Change-Id: I2196ee26e3e6fe20816834ecea5ea389eeab3171 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* 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>
* QProcess: Handle spurious socket notifications for stdout and stderrThiago Macieira2014-06-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | On Unix systems where the GUI event dispatcher uses a notification system for socket notifiers that is out of band compared to select(), it's possible for the QSocketNotifier to activate after the pipe has been read from. When that happened, the ioctl(2) call with FIONREAD might return 0 bytes available, which we interpreted to mean EOF. Instead of doing that, always try to read at least one byte and examine the returned byte count from read(2). If it returns 0, that's a real EOF; if it returns -1 EWOULDBLOCK, we simply ignore the situation. That's the case on OS X: the Cocoa event dispatcher uses CFSocket to get notifications and those use kevent (and, apparently, an auxiliary thread) instead of an in-thread select() or poll(). That means the event loop would activate the QSocketNotifier even though there is nothing to be read. Task-number: QTBUG-39488 Change-Id: I1a58b5b1db7a47034fb36a78a005ebff96290efb Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Don't try to read from invalid file descriptors in QProcessThiago Macieira2014-06-121-0/+2
| | | | | | | | | strace reveals that we do ioctl(-1, FIONREAD) and get EBADF. The only case where this could happen is inside _q_processDied, which calls the read functions without checking if the pipe is still open. Change-Id: I67637fc4267be73fc03d40c444fdfea89e1ef715 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* QProcessPrivate: merge the functions dealing with stdout and stderrThiago Macieira2014-06-121-28/+7
| | | | | | | Simplifies the code. Change-Id: I4b3a6e725eb245d3531d1d11d959fb3b85862778 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Rename QProcessPrivate::destroyChannel to closeChannelThiago Macieira2014-06-121-5/+5
| | | | | | | | | | | 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 channel buffers into QProcessPrivate::ChannelThiago Macieira2014-06-121-4/+4
| | | | | | | 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-54/+31
| | | | | | | | | | | | | | ... 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>
* do not use fileno calls in forked childJoerg Bornemann2014-03-061-4/+4
| | | | | | | | | | | | | | | | | | | | This fixes an issue that causes QProcess::start to silently fail on OS X 10.9. Apparently, fileno(stdout) locks the handle on OS X 10.9. It may happen that the parent process fflush()s stdout while the child has just been forked. The stdout lock of the parent is never released in the child and fileno(stdout) therefore locks forever. According to the fork documentation on opengroup.org one may only call async-signal-safe functions between fork and exec in the child. The fileno() function does not appear in the list of async-signal-safe functions. Also, fileno(stdout) and friends can be easily replaced by the standard constants STDOUT_FILENO etc. Done-with: Fawzi Mohamed <fawzi.mohamed@digia.com> Task-number: QTBUG-37306 Change-Id: I2b1f5f47cc48a1ad020fb0493a955d2bc27aeb47 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* expand tabs and related whitespace fixes in *.{cpp,h,qdoc}Oswald Buddenhagen2014-01-131-50/+50
| | | | | | | | the diff -w for this commit is empty. Started-by: Thiago Macieira <thiago.macieira@intel.com> Change-Id: I77bb84e71c63ce75e0709e5b94bee18e3ce6ab9e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix a crash in QProcess signal handling on Mac.Friedemann Kleint2013-09-251-1/+2
| | | | | | | | On Mac, SA_SIGINFO can be set while the handler is SIG_DFL. Change-Id: Ibaeaa1612e27217826841d7400309c45b5a101ea Initial-patch-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge branch 'stable' into devSergio Ahumada2013-09-211-9/+31
|\ | | | | | | Change-Id: I37d85631ab1165ab91457d8880c4da907a9df73b
| * Fix sigchld-HandlerH. Rittich2013-09-171-9/+31
| | | | | | | | | | | | | | | | | | | | Changed the sigchld-Handler such that the SA_SIGINFO flag is handeled correctly. Furthermore the signal mask is preserved such that the original signal handler is not interrupted when not allowed. Task-number: QTBUG-32979 Change-Id: Iec7663e7289ea5d95155f52cf8788ebf646cfabd Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | add QProcess::InputChannelModeOswald Buddenhagen2013-09-051-7/+8
| | | | | | | | | | | | | | | | | | | | | | 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>
* | add QProcess::Forwarded{Output,Error}ChannelOswald Buddenhagen2013-09-051-2/+13
| | | | | | | | | | | | | | Change-Id: Ifc5ed20c38f3228ef25c28681f296d0456b61abe Reviewed-by: Simon Hausmann <simon.hausmann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* | BlackBerry: Rearmed socket notifiers after selectBernd Weimer2013-07-241-4/+51
|/ | | | | | | | | | | Socket notifiers that are registered with BPS are disabled by a call to select. This solves the echoTest2 test case of QProcess. Change-Id: Ic7f3f14433477b89eaad5ffbeb6c22a1b5c2e910 Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
* restore QProcessEnvironment shared data thread safety on unixOswald Buddenhagen2013-05-201-1/+3
| | | | | | | | | | | | | | | | | 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>
* Utilize the new Q_OS_MACX define.Jake Petroules2013-05-091-1/+1
| | | | | | | | | | All occurrences of `#if defined(Q_OS_MAC) && !defined(Q_OS_IOS)` have been replaced with `#if defined(Q_OS_MACX)`. Change-Id: I5055d9bd1845136beb8ed1c79a8f0f2c0897751a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QThread: fix race when setting the eventDispatcherDavid Faure2013-03-221-2/+2
| | | | | | | Use QAtomicPointer to make this thread-safe. Change-Id: If71f204699fcefabdb59bd26342d777d1cc9e2a7 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
* Fix QTBUG-18934 by checking return value of qt_safe_pipeSimeon Bird2013-02-201-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | When QProcess->start() is called, Qt creates a pipe to the process to get its exit value and output. It does this with qt_create_pipe, which calls qt_safe_pipe. qt_safe_pipe, on failure, returns 1. qt_create_pipe then sets errno and returns void. The calling function, QProcessPrivate::startProcess, does not check errno, and thus continues to fork the process, assuming the pipe has been created successfully. The child process then has no way to pass its exit value to the calling process, since the communication pipes it would normally use do not exist, and thus when it exits it becomes a zombie. As a bonus, if waitForFinished is called on a broken process, a crash results because it is trying to wait on a pipe which does not exist. The fix makes qt_create_pipe return an integer, and QProcess::startProcess check the return value, set processError and not create the child process. Task-Number: QTBUG-18934 Change-Id: I2e1effdd0617be5b8c5492bcbcf5f2b1584b2241 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Switch to struct timespec everywhere instead of timevalThiago Macieira2013-01-281-2/+2
| | | | | | | | | | | | This avoids an extra division by 1000 when getting the current time. This can't overflow, under normal circumstances, even on 32-bit: when adding two values less than 1 billion, the result is less than 2 billion, which is less than 2^31. Change-Id: I6f8e1aadfe2fcf6ac8da584eab4c1e61aee51cbb Reviewed-by: David Faure (KDE) <faure@kde.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.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>
* QNX: fix QProcess fd inheritanceRafael Roquetto2012-11-271-3/+18
| | | | | | | | | | Under QNX, QProcess was not inheriting the parent's file descriptors. This patch fills in the fd_map array, containing the file descriptors to be inherited, which is passed to spawn(), accordingly. Change-Id: Ia160abda88c1ffede877301aeae93a97c2b35320 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
* Re-revert "Delay creation of the process manager"Thiago Macieira2012-10-151-13/+2
| | | | | | | | | | | | | | | This reverts commit daba2c507ad42c66dafa6a29cffa94e9641e0c58, re-applying commit d9c06bf25210b3d0b31ee6126e57bcb82c292da1, because the change was accidentally brought back in commit eae8fb85997d82ecec0743ba3e470681129bff41. There's a potential deadlock when a QProcess is created while a QCoreApplication is instantiated but never executed, or if the main thread waits() for the child thread. Task-number: QTBUG-27260 Change-Id: I9e0fdc0341b3063de90979377bac35f2a827b260 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* Centralise handling & ignoring of SIGPIPE in qcore_unix_p.hThiago Macieira2012-09-241-19/+1
| | | | | | | | | | | | | We had two instances of this function in the Qt source code, one clearly a copy of the other, so both had the same thread-safety issue. Instead, let's have one copy and have both write_nosignal() and sendto() call them. Q_NO_POSIX_SIGNALS is also gone. It was only used with Symbian. Change-Id: I0f1354a8e9df8e6b10a02f86a940e3c6d1222087 Reviewed-by: Peter Hartmann <phartmann@rim.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.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>
* Fix thread-safety of qt_ignore_sigpipeThiago Macieira2012-09-181-1/+5
| | | | | | | | | | | | | The testAndSet operation would mean another thread could see the value of 1 and proceed to write(2)/sendto(2) before SIGPIPE had been ignored. If the pipe or socket were already closed by then, a SIGPIPE would be delivered to the application with its default action: terminate. Change-Id: I62dc8f5fa14c1dd453d13e4053c642bd78fbc468 Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Shane Kearns <shane.kearns@accenture.com> Reviewed-by: Peter Hartmann <phartmann@rim.com>
* normalize the process arguments to Normalization Form D on macKonstantin Ritt2012-06-061-18/+6
| | | | | | | | | | QFile::encodeName() does this for us + simplifies the code a bit Change-Id: Id2ca2615e20408229dd021c26587fefd60365352 Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com> Reviewed-by: João Abecasis <joao.abecasis@nokia.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* fix undefined behavior issue on IntegrityKonstantin Ritt2012-04-191-7/+0
| | | | | | | | in contrast to ::strdup(), qstrdup() allocates memory via new[]; deallocating this memory with free() leads to undefine behavior. Change-Id: I0692c4bef010c05de547283b00b6c6043ac24c79 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Change coreservices -> iosIan Dean2012-04-191-2/+2
| | | | | | | | Replace "contains(QT_CONFIG, coreservices)" with "!ios" in config files. Replace "QT_NO_CORESERVICES" with "Q_OS_IOS" in source files. Change-Id: Id3b02316b245a24ce550e0b47596d18a4a409e4f Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
* Suppress warnings caused by ignoring chdir retvalGirish Ramakrishnan2012-04-121-7/+14
| | | | | | | | | | | | Using g++ 4.6.1, we get warnings like below: qprocess_unix.cpp:1376:69: warning: ignoring return value of ‘int chdir(const char*)’, declared with attribute warn_unused_result [-Wunused-result] g++ is pretty adamant and prints the warning even if you explicitly ignore using (void). So, just check for error and print a warning. Change-Id: Ifd6f3b6bb9e17d44aa235815b06a762131ca8751 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Enables QProcess back on QNX.Rafael Roquetto2012-02-171-14/+145
| | | | | | | | | | 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>
* Use QBasicMutex instead of Q_GLOBAL_STATIC QMutexOlivier Goffart2012-02-011-9/+4
| | | | | | | | | | | | | | QBasicMutex is a POD and can be used as a static global object. in qpicture.cpp factoryLoader is used only once, and under the mutex, so there is no need for Q_GLOBAL_STATIC for it, it can be a function static in qhostinfo_unix.cpp the code seemed wrong while compiled with namespace and QT_NO_GETADDRINFO. I also could get rid of one include because it was included earlier. Change-Id: I3c700203c3e067266c20733f4bda8031446dbb86 Reviewed-by: Bradley T. Hughes <bradley.hughes@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/+5
| | | | | | | | 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>