- apply upstream patch to fix klauncher crash
This commit is contained in:
parent
44f46e09dc
commit
3f48398ea9
@ -1,5 +1,5 @@
|
|||||||
--- branches/KDE/4.0/kdelibs/kdecore/kernel/kglobal.cpp 2008/01/04 09:09:11 757128
|
--- kdelibs/kdecore/kernel/kglobal.cpp 2008/01/04 09:09:11 757128
|
||||||
+++ branches/KDE/4.0/kdelibs/kdecore/kernel/kglobal.cpp 2008/04/04 08:48:53 793504
|
+++ kdelibs/kdecore/kernel/kglobal.cpp 2008/04/04 08:48:53 793504
|
||||||
@@ -28,6 +28,12 @@
|
@@ -28,6 +28,12 @@
|
||||||
#include "kglobal.h"
|
#include "kglobal.h"
|
||||||
#include "kglobal_p.h"
|
#include "kglobal_p.h"
|
||||||
|
83
kdelibs-4.0.3-klauncher-crash.patch
Normal file
83
kdelibs-4.0.3-klauncher-crash.patch
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
Index: kinit/klauncher.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kinit/klauncher.cpp (Revision 792865)
|
||||||
|
+++ kinit/klauncher.cpp (Revision 792866)
|
||||||
|
@@ -231,16 +231,19 @@
|
||||||
|
{
|
||||||
|
#ifdef Q_WS_X11
|
||||||
|
if( mCached_dpy != NULL )
|
||||||
|
+ {
|
||||||
|
XCloseDisplay( mCached_dpy );
|
||||||
|
+ mCached_dpy = NULL;
|
||||||
|
+ }
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
-KLauncher::destruct(int exit_code)
|
||||||
|
+KLauncher::destruct()
|
||||||
|
{
|
||||||
|
if (QCoreApplication::instance()) ((KLauncher*)QCoreApplication::instance())->close();
|
||||||
|
// We don't delete the app here, that's intentional.
|
||||||
|
- ::_exit(exit_code);
|
||||||
|
+ ::_exit(255);
|
||||||
|
}
|
||||||
|
|
||||||
|
void KLauncher::setLaunchEnv(const QString &name, const QString &value)
|
||||||
|
@@ -312,7 +315,7 @@
|
||||||
|
kDebug(7016) << "Exiting on read_socket errno:" << errno;
|
||||||
|
::signal( SIGHUP, SIG_IGN);
|
||||||
|
::signal( SIGTERM, SIG_IGN);
|
||||||
|
- destruct(255); // Exit!
|
||||||
|
+ destruct(); // Exit!
|
||||||
|
}
|
||||||
|
requestData.resize(request_header.arg_length);
|
||||||
|
result = read_socket(kdeinitSocket, (char *) requestData.data(),
|
||||||
|
Index: kinit/klauncher_main.cpp
|
||||||
|
===================================================================
|
||||||
|
--- kinit/klauncher_main.cpp (Revision 792865)
|
||||||
|
+++ kinit/klauncher_main.cpp (Revision 792866)
|
||||||
|
@@ -35,13 +35,15 @@
|
||||||
|
#include <QtCore/QCoreApplication>
|
||||||
|
|
||||||
|
#ifndef Q_WS_WIN
|
||||||
|
+static int sigpipe[ 2 ];
|
||||||
|
static void sig_handler(int sig_num)
|
||||||
|
{
|
||||||
|
// No recursion
|
||||||
|
signal( SIGHUP, SIG_IGN);
|
||||||
|
signal( SIGTERM, SIG_IGN);
|
||||||
|
-fprintf(stderr, "klauncher: Exiting on signal %d\n", sig_num);
|
||||||
|
- KLauncher::destruct(255);
|
||||||
|
+ fprintf(stderr, "klauncher: Exiting on signal %d\n", sig_num);
|
||||||
|
+ char tmp = 'x';
|
||||||
|
+ write( sigpipe[ 1 ], &tmp, 1 );
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -103,6 +105,9 @@
|
||||||
|
QDBusConnection::sessionBus().registerObject("/", launcher);
|
||||||
|
|
||||||
|
#ifndef Q_WS_WIN
|
||||||
|
+ pipe( sigpipe );
|
||||||
|
+ QSocketNotifier* signotif = new QSocketNotifier( sigpipe[ 0 ], QSocketNotifier::Read, launcher );
|
||||||
|
+ QObject::connect( signotif, SIGNAL( activated( int )), launcher, SLOT( destruct()));
|
||||||
|
KCrash::setEmergencySaveFunction(sig_handler);
|
||||||
|
signal( SIGHUP, sig_handler);
|
||||||
|
signal( SIGPIPE, SIG_IGN);
|
||||||
|
Index: kinit/klauncher.h
|
||||||
|
===================================================================
|
||||||
|
--- kinit/klauncher.h (Revision 792865)
|
||||||
|
+++ kinit/klauncher.h (Revision 792866)
|
||||||
|
@@ -123,8 +123,10 @@
|
||||||
|
~KLauncher();
|
||||||
|
|
||||||
|
void close();
|
||||||
|
- static void destruct(int exit_code); // exit!
|
||||||
|
|
||||||
|
+public slots:
|
||||||
|
+ void destruct(); // exit!
|
||||||
|
+
|
||||||
|
protected:
|
||||||
|
void processDied(pid_t pid, long exitStatus);
|
||||||
|
|
10
kdelibs.spec
10
kdelibs.spec
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
Summary: K Desktop Environment 4 - Libraries
|
Summary: K Desktop Environment 4 - Libraries
|
||||||
Version: 4.0.3
|
Version: 4.0.3
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
|
|
||||||
%if 0%{?fedora} > 8
|
%if 0%{?fedora} > 8
|
||||||
Name: kdelibs
|
Name: kdelibs
|
||||||
@ -84,6 +84,7 @@ Patch14: kdelibs-4.0.3-libexecdir.patch
|
|||||||
# based on SVN commit 793504 by dfaure
|
# based on SVN commit 793504 by dfaure
|
||||||
# Move the umask value out of KConfigPrivate to avoid a crash on exit when ~KConfig calls sync.
|
# Move the umask value out of KConfigPrivate to avoid a crash on exit when ~KConfig calls sync.
|
||||||
Patch100: kdelibs-4.0.3-kconfig_sync_crash.patch
|
Patch100: kdelibs-4.0.3-kconfig_sync_crash.patch
|
||||||
|
Patch101: kdelibs-4.0.3-klauncher-crash.patch
|
||||||
|
|
||||||
BuildRequires: qt4-devel >= 4.3.0
|
BuildRequires: qt4-devel >= 4.3.0
|
||||||
Requires: qt4 >= %{_qt4_version}
|
Requires: qt4 >= %{_qt4_version}
|
||||||
@ -204,8 +205,8 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage
|
|||||||
%patch13 -p1 -b .fedora-buildtype
|
%patch13 -p1 -b .fedora-buildtype
|
||||||
%patch14 -p1 -b .libexecdir
|
%patch14 -p1 -b .libexecdir
|
||||||
|
|
||||||
%patch100 -p4 -b .kconfig_sync_crash
|
%patch100 -p1 -b .kconfig_sync_crash
|
||||||
|
%patch101 -p1 -b .klauncher-crash
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -365,6 +366,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Apr 04 2008 Than Ngo <than@redhat.com> - 4.0.3-6
|
||||||
|
- apply upstream patch to fix klauncher crash
|
||||||
|
|
||||||
* Fri Apr 4 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.3-5
|
* Fri Apr 4 2008 Rex Dieter <rdieter@fedoraproject.org> 4.0.3-5
|
||||||
- kconfig_sync_crash patch
|
- kconfig_sync_crash patch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user