 +target_link_libraries(webkitfuzz ${webkitfuzz_LIBRARIES})
 +
 +install(TARGETS webkitfuzz DESTINATION "${LIBEXEC_INSTALL_DIR}")
-diff -ruN webkitgtk-2.20.2-original/Tools/webkitfuzz/main.c webkitgtk-2.20.2-patched/Tools/webkitfuzz/main.c
---- webkitgtk-2.20.2-original/Tools/webkitfuzz/main.c	1969-12-31 16:00:00.000000000 -0800
-+++ webkitgtk-2.20.2-patched/Tools/webkitfuzz/main.c	2018-08-30 04:48:22.833020025 -0700
-@@ -0,0 +1,122 @@
+diff --git a/Tools/webkitfuzz/main.c b/Tools/webkitfuzz/main.c
+new file mode 100644
+index 000000000000..a02da70dd451
+--- /dev/null
++++ b/Tools/webkitfuzz/main.c
+@@ -0,0 +1,125 @@
 +#include <gtk/gtk.h>
 +#include <webkit2/webkit2.h>
 +

+  return NULL;
+}
+
 static void childSetupFunction(gpointer userData)
 {
     int socket = GPOINTER_TO_INT(userData);
@@ -138,8 +284,20 @@
     argv[i++] = nullptr;
 
     GUniqueOutPtr<GError> error;
-    if (!g_spawn_async(nullptr, argv, nullptr, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, childSetupFunction, GINT_TO_POINTER(socketPair.server), &pid, &error.outPtr()))
-        g_error("Unable to fork a new child process: %s", error->message);
+
+    if(m_launchOptions.processType == ProcessLauncher::ProcessType::Web) {
+      if (!g_spawn_async(nullptr, argv, nullptr, GSpawnFlags(G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_DO_NOT_REAP_CHILD), childSetupFunction, GINT_TO_POINTER(socketPair.server), &pid, &error.outPtr())) {
+          g_printerr("Unable to fork a new WebProcess: %s.\n", error->message);
+          ASSERT_NOT_REACHED();
+      }
+      pthread_t thread_id;
+      pthread_create(&thread_id, NULL, wait_thread, (void *)pid);
+    } else {
+      if (!g_spawn_async(nullptr, argv, nullptr, G_SPAWN_LEAVE_DESCRIPTORS_OPEN, childSetupFunction, GINT_TO_POINTER(socketPair.server), &pid, &error.outPtr())) {
+          g_printerr("Unable to fork a new WebProcess: %s.\n", error->message);
+          ASSERT_NOT_REACHED();
+      }
+    }
 
     // Don't expose the parent socket to potential future children.
     if (!setCloseOnExec(socketPair.client))
diff -ruN webkitgtk-2.20.2-original/Tools/CMakeLists.txt webkitgtk-2.20.2-patched/Tools/CMakeLists.txt
--- webkitgtk-2.20.2-original/Tools/CMakeLists.txt	2018-02-18 23:45:33.000000000 -0800
+++ webkitgtk-2.20.2-patched/Tools/CMakeLists.txt	2018-06-07 08:57:57.872532000 -0700
@@ -15,6 +15,9 @@
     if (ENABLE_MINIBROWSER)
         add_subdirectory(MiniBrowser/gtk)
     endif ()
+
+    add_subdirectory(webkitfuzz)
+
 elseif ("${PORT}" STREQUAL "Mac")
     add_subdirectory(DumpRenderTree)
     add_subdirectory(WebKitTestRunner)
diff -ruN webkitgtk-2.20.2-original/Tools/webkitfuzz/CMakeLists.txt webkitgtk-2.20.2-patched/Tools/webkitfuzz/CMakeLists.txt
--- webkitgtk-2.20.2-original/Tools/webkitfuzz/CMakeLists.txt	1969-12-31 16:00:00.000000000 -0800
+++ webkitgtk-2.20.2-patched/Tools/webkitfuzz/CMakeLists.txt	2017-12-13 06:42:56.968691000 -0800
@@ -0,0 +1,40 @@
+set(WEBKITFUZZ_DIR "${TOOLS_DIR}/webkitfuzz")
+

+        timeout = TIMEOUT;
+    }
+
+    printf("webkitfuzz started: %s\n",argv[1]);
+
+    if((strncmp(argv[1],"http://", 7) == 0) || (strncmp(argv[1],"https://", 8) == 0)) {
+        inputtype = TYPE_URL;
