logo

etc_portage

Unnamed repository; edit this file 'description' to name the repository. git clone https://hacktivis.me/git/etc_portage.git

0006-ProcessLauncher-launchProcess-Do-not-g_error-on-me.patch (1501B)


  1. From 92f36499c7188c6675b71e189028c3bbc8464e73 Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Mon, 29 Jul 2019 16:41:43 +0200
  4. Subject: [PATCH 6/8] ProcessLauncher::launchProcess: Do not g_error() on me
  5. ---
  6. .../UIProcess/Launcher/glib/ProcessLauncherGLib.cpp | 8 ++++++--
  7. 1 file changed, 6 insertions(+), 2 deletions(-)
  8. diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
  9. index 1986ffe4..0e452dac 100644
  10. --- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
  11. +++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
  12. @@ -34,6 +34,7 @@
  13. #include <errno.h>
  14. #include <fcntl.h>
  15. #include <glib.h>
  16. +#include <glib/gprintf.h>
  17. #include <wtf/FileSystem.h>
  18. #include <wtf/RunLoop.h>
  19. #include <wtf/UniStdExtras.h>
  20. @@ -202,8 +203,11 @@ void ProcessLauncher::launchProcess()
  21. #endif // OS(LINUX)
  22. process = adoptGRef(g_subprocess_launcher_spawnv(launcher.get(), argv, &error.outPtr()));
  23. - if (!process.get())
  24. - g_error("Unable to fork a new child process: %s", error->message);
  25. + if (!process.get()) {
  26. + g_fprintf(stderr, "WebKit: Unable to fork a new child process: %s", error->message);
  27. + //TODO: try to clean before returning
  28. + return;
  29. + }
  30. const char* processIdStr = g_subprocess_get_identifier(process.get());
  31. m_processIdentifier = g_ascii_strtoll(processIdStr, nullptr, 0);
  32. --
  33. 2.24.1