mirror of
https://github.com/RGBCube/serenity
synced 2025-07-10 10:47:35 +00:00
Ladybird: Remove unused spawn helper
The spawn_helper_process method was introduced together with get_paths_for_helper_process but was only ever used briefly to spawn WebContent. Other helper processes (SqlServer, headless_browser etc) are either execed or spawned with their own helpers & custom arguments.
This commit is contained in:
parent
05fc63932b
commit
fd86509ef8
2 changed files with 0 additions and 16 deletions
|
@ -6,23 +6,8 @@
|
||||||
|
|
||||||
#include "HelperProcess.h"
|
#include "HelperProcess.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
#include <AK/String.h>
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
|
|
||||||
ErrorOr<void> spawn_helper_process(StringView process_name, ReadonlySpan<StringView> arguments, Core::System::SearchInPath search_in_path, Optional<ReadonlySpan<StringView>> environment)
|
|
||||||
{
|
|
||||||
auto paths = TRY(get_paths_for_helper_process(process_name));
|
|
||||||
VERIFY(!paths.is_empty());
|
|
||||||
ErrorOr<void> result;
|
|
||||||
for (auto const& path : paths) {
|
|
||||||
result = Core::System::exec(path, arguments, search_in_path, environment);
|
|
||||||
if (!result.is_error())
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name)
|
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name)
|
||||||
{
|
{
|
||||||
auto application_path = TRY(ak_string_from_qstring(QCoreApplication::applicationDirPath()));
|
auto application_path = TRY(ak_string_from_qstring(QCoreApplication::applicationDirPath()));
|
||||||
|
|
|
@ -12,5 +12,4 @@
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
#include <LibCore/System.h>
|
#include <LibCore/System.h>
|
||||||
|
|
||||||
ErrorOr<void> spawn_helper_process(StringView process_name, ReadonlySpan<StringView> arguments, Core::System::SearchInPath, Optional<ReadonlySpan<StringView>> environment = {});
|
|
||||||
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name);
|
ErrorOr<Vector<String>> get_paths_for_helper_process(StringView process_name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue