[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

andreas.kling at nokia.com andreas.kling at nokia.com
Wed Dec 22 15:54:02 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 347d143b0d25d7b488512405f4e1ae40ada721f2
Author: andreas.kling at nokia.com <andreas.kling at nokia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Nov 16 11:50:02 2010 +0000

    2010-11-15  Andreas Kling  <kling at webkit.org>
    
            Reviewed by Kenneth Rohde Christiansen.
    
            [Qt] Kill the web process if the UI process dies
    
            Connect UI (parent) process death signal to SIGKILL of the web
            process (child). This ensures that there's no stale web processes
            after the UI process has crashed.
    
            Original patch by Kimmo Kinnunen.
    
            * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
            (WebKit::QtWebProcess::QtWebProcess):
            (WebKit::QtWebProcess::setupChildProcess):
            (WebKit::ProcessLauncherHelper::launch):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@72077 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index 28c98cd..656d354 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,20 @@
+2010-11-15  Andreas Kling  <kling at webkit.org>
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        [Qt] Kill the web process if the UI process dies
+
+        Connect UI (parent) process death signal to SIGKILL of the web
+        process (child). This ensures that there's no stale web processes
+        after the UI process has crashed.
+
+        Original patch by Kimmo Kinnunen.
+
+        * UIProcess/Launcher/qt/ProcessLauncherQt.cpp:
+        (WebKit::QtWebProcess::QtWebProcess):
+        (WebKit::QtWebProcess::setupChildProcess):
+        (WebKit::ProcessLauncherHelper::launch):
+
 2010-11-16  Simon Hausmann  <simon.hausmann at nokia.com>
 
         Rubber-stamped by Andreas Kling.
diff --git a/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp b/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
index 8f67b4f..1c2c6e1 100644
--- a/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
+++ b/WebKit2/UIProcess/Launcher/qt/ProcessLauncherQt.cpp
@@ -47,6 +47,10 @@
 
 #include <sys/resource.h>
 #include <unistd.h>
+#if defined Q_OS_UNIX
+#include <sys/prctl.h>
+#include <signal.h>
+#endif
 
 using namespace WebCore;
 
@@ -67,6 +71,25 @@ private:
     Q_SLOT void newConnection();
 };
 
+class QtWebProcess : public QProcess
+{
+    Q_OBJECT
+public:
+    QtWebProcess(QObject* parent = 0)
+        : QProcess(parent)
+    {}
+
+protected:
+    virtual void setupChildProcess();
+};
+
+void QtWebProcess::setupChildProcess()
+{
+#if defined Q_OS_UNIX
+    prctl(PR_SET_PDEATHSIG, SIGKILL);
+#endif
+}
+
 void ProcessLauncherHelper::launch(WebKit::ProcessLauncher* launcher)
 {
     QString applicationPath = "%1 %2";
@@ -79,7 +102,7 @@ void ProcessLauncherHelper::launch(WebKit::ProcessLauncher* launcher)
 
     QString program(applicationPath.arg(m_server.serverName()));
 
-    QProcess* webProcess = new QProcess();
+    QProcess* webProcess = new QtWebProcess();
     webProcess->setProcessChannelMode(QProcess::ForwardedChannels);
     webProcess->start(program);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list