Changeset 141587 in webkit


Ignore:
Timestamp:
Feb 1, 2013 6:17:49 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r141319.
http://trac.webkit.org/changeset/141319
https://bugs.webkit.org/show_bug.cgi?id=108629

This patch is causing the UIProcess to hang on GTK port when
loading plugins (Requested by chris-qBT_laptop on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2013-02-01

  • UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:

(WebKit::PluginProcessProxy::scanPlugin):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r141583 r141587  
     12013-02-01  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r141319.
     4        http://trac.webkit.org/changeset/141319
     5        https://bugs.webkit.org/show_bug.cgi?id=108629
     6
     7        This patch is causing the UIProcess to hang on GTK port when
     8        loading plugins (Requested by chris-qBT_laptop on #webkit).
     9
     10        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
     11        (WebKit::PluginProcessProxy::scanPlugin):
     12
    1132013-02-01  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
    214
  • trunk/Source/WebKit2/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp

    r141319 r141587  
    5959}
    6060
    61 static bool spawnProcessSync(char** argv, char** standardOutput, char** standardError, int* exitStatus)
    62 {
    63     // If the disposition of SIGCHLD signal is set to SIG_IGN (default) then
    64     // the signal will be ignored and g_spawn_sync() will not be able to return
    65     // the status. As a consequence, we make sure that the disposition is set
    66     // to SIG_DFL before calling g_spawn_sync().
    67     struct sigaction defaultAction, oldAction;
    68     defaultAction.sa_handler = SIG_DFL;
    69     defaultAction.sa_flags = 0;
    70     sigemptyset(&defaultAction.sa_mask);
    71     sigaction(SIGCHLD, &defaultAction, &oldAction);
    72 
    73     bool success = g_spawn_sync(0, argv, 0, G_SPAWN_STDERR_TO_DEV_NULL, 0, 0, standardOutput, standardError, exitStatus, 0);
    74 
    75     // Restore SIGCHLD signal disposition.
    76     sigaction(SIGCHLD, &oldAction, 0);
    77 
    78     return success;
    79 }
    80 
    8161bool PluginProcessProxy::scanPlugin(const String& pluginPath, RawPluginMetaData& result)
    8262{
     
    9373    char* stdOut = 0;
    9474
     75    // If the disposition of SIGCLD signal is set to SIG_IGN (default)
     76    // then the signal will be ignored and g_spawn_sync() will not be
     77    // able to return the status.
     78    // As a consequence, we make sure that the disposition is set to
     79    // SIG_DFL before calling g_spawn_sync().
     80    struct sigaction action;
     81    sigaction(SIGCLD, 0, &action);
     82    if (action.sa_handler == SIG_IGN) {
     83        action.sa_handler = SIG_DFL;
     84        sigaction(SIGCLD, &action, 0);
     85    }
    9586
    96     if (!spawnProcessSync(argv, &stdOut, 0, &status))
     87    if (!g_spawn_sync(0, argv, 0, G_SPAWN_STDERR_TO_DEV_NULL, 0, 0, &stdOut, 0, &status, 0))
    9788        return false;
    9889
Note: See TracChangeset for help on using the changeset viewer.