summaryrefslogtreecommitdiff
path: root/Ladybird/HelperProcess.h
diff options
context:
space:
mode:
authorAndrew Kaster <akaster@serenityos.org>2023-02-02 03:00:30 -0700
committerAndrew Kaster <andrewdkaster@gmail.com>2023-02-02 05:35:44 -0700
commit3e6d790cf07024f6ed0e5246e0c2b091fed65638 (patch)
treeb51363cc4c97eb6f3f80c0adda12ace007235c6f /Ladybird/HelperProcess.h
parent792258afe8b7ab0343f8b53c826ccd1b6fb60998 (diff)
downloadserenity-3e6d790cf07024f6ed0e5246e0c2b091fed65638.zip
Ladybird: Abstract spawning helper processes into separate methods
This will let us use the same path discovery methods for WebContent, SQLServer, and any other helper processes we need to launch.
Diffstat (limited to 'Ladybird/HelperProcess.h')
-rw-r--r--Ladybird/HelperProcess.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Ladybird/HelperProcess.h b/Ladybird/HelperProcess.h
new file mode 100644
index 0000000000..18d530a321
--- /dev/null
+++ b/Ladybird/HelperProcess.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2023, Andrew Kaster <akaster@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#define AK_DONT_REPLACE_STD
+
+#include <AK/Error.h>
+#include <AK/Optional.h>
+#include <AK/Span.h>
+#include <AK/StringView.h>
+#include <LibCore/System.h>
+
+ErrorOr<void> spawn_helper_process(StringView process_name, Span<StringView> arguments, Core::System::SearchInPath, Optional<Span<StringView>> environment = {});
+ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name);