1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:37:35 +00:00

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. :^)
This commit is contained in:
Andreas Kling 2021-08-06 01:04:11 +02:00
parent ad3ae7e0e8
commit 6e65b36973
3 changed files with 55 additions and 0 deletions

View file

@ -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);
};
}