logo

etc_portage

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

0011-ProcessLauncher-launchProcess-Do-not-g_error-on-me.patch (1492B)


  1. From 803634b6b013235898f47daa4020128cbb57ee4a 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 11/14] 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 da8ff67fe..06cf973ff 100644
  10. --- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
  11. +++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
  12. @@ -33,6 +33,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. @@ -167,8 +168,11 @@ void ProcessLauncher::launchProcess()
  21. #endif
  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