_hppa_bug561203_decrease_failure_rate
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Tue, 5 Feb 2013 21:52:29 +0000 (21:52 +0000)
committerLisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>
Tue, 5 Feb 2013 21:52:29 +0000 (21:52 +0000)
~1/1000 when run in a row. Hopefully, this will make failures rare enough
 not to cause FTBFSes.
 Degradation in performance should not be very significant and is acceptable.
Author: Modestas Vainius <modax@debian.org>
Author: Fathi Boudra <fabo@debian.org>
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561203
Origin: vendor
Last-Update: 2011-12-26

Gbp-Pq: Name 99_hppa_bug561203_decrease_failure_rate.diff

src/corelib/io/qprocess_unix.cpp

index b69961178eb501864bb8c989f9cf02f2182542b7..e7465e1f49baf29e174ed710bd275634162389c9 100644 (file)
@@ -526,6 +526,13 @@ static char **_q_dupEnvironment(const QProcessEnvironmentPrivate::Hash &environm
     return envp;
 }
 
+inline void debbug_561203()
+{
+#if defined(__linux__) && defined(__hppa__)
+        usleep(1000);
+#endif
+}
+
 #ifdef Q_OS_MAC
 Q_GLOBAL_STATIC(QMutex, cfbundleMutex);
 #endif
@@ -647,6 +654,7 @@ void QProcessPrivate::startProcess()
 #if defined(Q_OS_QNX)
     pid_t childPid = spawnChild(workingDirPtr, argv, envp);
 #else
+    debbug_561203();
     pid_t childPid = fork();
     int lastForkErrno = errno;
 #endif
@@ -1340,6 +1348,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
     int pidPipe[2];
     qt_safe_pipe(pidPipe);
 
+    debbug_561203();
     pid_t childPid = fork();
     if (childPid == 0) {
         struct sigaction noaction;
@@ -1352,6 +1361,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
         qt_safe_close(startedPipe[0]);
         qt_safe_close(pidPipe[0]);
 
+        debbug_561203();
         pid_t doubleForkPid = fork();
         if (doubleForkPid == 0) {
             qt_safe_close(pidPipe[1]);