0013-ProcessLauncher-launchProcess-Do-not-g_error-on-me.patch (1490B)
- From 1b29d6a4eadfc9e9d466f39461710502e67778bd Mon Sep 17 00:00:00 2001
- From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
- Date: Mon, 29 Jul 2019 16:41:43 +0200
- Subject: [PATCH 13/15] ProcessLauncher::launchProcess: Do not g_error() on me
- ---
- .../UIProcess/Launcher/glib/ProcessLauncherGLib.cpp | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
- diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
- index da8ff67f..06cf973f 100644
- --- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
- +++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
- @@ -33,6 +33,7 @@
- #include <errno.h>
- #include <fcntl.h>
- #include <glib.h>
- +#include <glib/gprintf.h>
- #include <wtf/FileSystem.h>
- #include <wtf/RunLoop.h>
- #include <wtf/UniStdExtras.h>
- @@ -167,8 +168,11 @@ void ProcessLauncher::launchProcess()
- #endif
- process = adoptGRef(g_subprocess_launcher_spawnv(launcher.get(), argv, &error.outPtr()));
- - if (!process.get())
- - g_error("Unable to fork a new child process: %s", error->message);
- + if (!process.get()) {
- + g_fprintf(stderr, "WebKit: Unable to fork a new child process: %s", error->message);
- + //TODO: try to clean before returning
- + return;
- + }
- const char* processIdStr = g_subprocess_get_identifier(process.get());
- m_processIdentifier = g_ascii_strtoll(processIdStr, nullptr, 0);
- --
- 2.24.1