From 1814142b7a11befab315bf3f9d91c4ffbf56ef3e Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Fri, 13 Dec 2013 22:07:52 -0800 Subject: Use forkfd in QProcess 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 --- src/corelib/kernel/qcoreapplication.cpp | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/corelib/kernel') diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index 555b5e0263..d082a2739a 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -48,7 +48,6 @@ #include #include #include -#include #include #include #ifndef QT_NO_QOBJECT @@ -739,14 +738,6 @@ void QCoreApplication::init() d->appendApplicationPathToLibraryPaths(); #endif -#ifndef QT_NO_QOBJECT -#if defined(Q_OS_UNIX) && !(defined(QT_NO_PROCESS)) - // Make sure the process manager thread object is created in the main - // thread. - QProcessPrivate::initializeProcessManager(); -#endif -#endif - #ifdef QT_EVAL extern void qt_core_eval_init(QCoreApplicationPrivate::Type); qt_core_eval_init(d->application_type); -- cgit v1.2.3