summaryrefslogtreecommitdiff
path: root/debian/patches/99_hppa_bug561203_decrease_failure_rate.diff
diff options
context:
space:
mode:
authorModestas Vainius <modestas@vainius.eu>2010-06-06 03:36:37 +0300
committerModestas Vainius <modestas@vainius.eu>2010-06-06 03:39:14 +0300
commitf7743216a1cb91373bd37f05db3c12da992cf09e (patch)
tree4a2a7332536d94b3c4f0ac61f252a7d49facbd45 /debian/patches/99_hppa_bug561203_decrease_failure_rate.diff
parent45e7ee93ef997a592027ce14c2b534a6044e7242 (diff)
downloadqt4-x11-f7743216a1cb91373bd37f05db3c12da992cf09e.tar.gz
Decrease failure rate in QProcess on hppa caused by #561203.
Add usleep(1000) before fork() in QProcess on hppa in order to decrease failure rate caused by #561203. Hopefully, probablity of the failure becomes so low that packages do not FBTFS anymore. This hack is just an ugly but very needed workaround for a common manifestation of the bug in QProcess (patch 99_hppa_bug561203_decrease_failure_rate.diff).
Diffstat (limited to 'debian/patches/99_hppa_bug561203_decrease_failure_rate.diff')
-rw-r--r--debian/patches/99_hppa_bug561203_decrease_failure_rate.diff24
1 files changed, 24 insertions, 0 deletions
diff --git a/debian/patches/99_hppa_bug561203_decrease_failure_rate.diff b/debian/patches/99_hppa_bug561203_decrease_failure_rate.diff
new file mode 100644
index 0000000..8156f56
--- /dev/null
+++ b/debian/patches/99_hppa_bug561203_decrease_failure_rate.diff
@@ -0,0 +1,24 @@
+Description: decrease failure rate of QProcess (#561203) on hppa ~100+ times
+ The patch adds a usleep() of 1000 before fork() in QProcess on hppa. This hack
+ seems to bring down likelihood of failure caused by #561203 from ~ 1/6 to
+~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>
+Forwarded: not-needed
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561203
+Origin: vendor
+Last-Update: 2010-06-06
+
+--- a/src/corelib/io/qprocess_unix.cpp
++++ b/src/corelib/io/qprocess_unix.cpp
+@@ -505,6 +505,9 @@ static char **_q_dupEnvironment(const QH
+ // under QNX RTOS we have to use vfork() when multithreading
+ inline pid_t qt_fork()
+ {
++#if defined(__linux__) && defined(__hppa__)
++ usleep(1000);
++#endif
+ #if defined(Q_OS_QNX)
+ return vfork();
+ #else