0006-ProcessLauncher-launchProcess-Do-not-g_error-on-me.patch (1501B)
- From 92f36499c7188c6675b71e189028c3bbc8464e73 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 6/8] 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 1986ffe4..0e452dac 100644
- --- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
- +++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
- @@ -34,6 +34,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>
- @@ -202,8 +203,11 @@ void ProcessLauncher::launchProcess()
- #endif // OS(LINUX)
- 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