summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCore/Process.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-08-06 01:04:11 +0200
committerAndreas Kling <kling@serenityos.org>2021-08-06 01:04:11 +0200
commit6e65b36973cf97e7fcfe4cc4f731e441bc2e69f4 (patch)
tree79aa24a3123a40ce1f508273e24537379bdb8468 /Userland/Libraries/LibCore/Process.h
parentad3ae7e0e850313a38ef94c986a058e272f6936b (diff)
downloadserenity-6e65b36973cf97e7fcfe4cc4f731e441bc2e69f4.zip
LibCore: Add Core::Process::spawn()
This is a simple wrapper around posix_spawn() that will help us simplify a bunch of very verbose posix_spawn() invocations. This first version only supports the simplest case: executing an executable without passing arguments or doing anything fancy. More features can be added to cover more cases. :^)
Diffstat (limited to 'Userland/Libraries/LibCore/Process.h')
-rw-r--r--Userland/Libraries/LibCore/Process.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/Process.h b/Userland/Libraries/LibCore/Process.h
new file mode 100644
index 0000000000..79820451e2
--- /dev/null
+++ b/Userland/Libraries/LibCore/Process.h
@@ -0,0 +1,18 @@
+/*
+ * Copyright (c) 2021, Andreas Kling <kling@serenityos.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+#pragma once
+
+#include <AK/Forward.h>
+
+namespace Core {
+
+class Process {
+public:
+ static pid_t spawn(StringView path);
+};
+
+}