2023-04-18 18:16:24 +02:00
|
|
|
#pragma once
|
|
|
|
#include <luna/Result.h>
|
2023-04-18 18:39:37 +02:00
|
|
|
#include <luna/String.h>
|
2023-04-18 18:16:24 +02:00
|
|
|
#include <sys/types.h>
|
|
|
|
|
|
|
|
namespace os
|
|
|
|
{
|
|
|
|
class Process
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
static Result<pid_t> fork();
|
2023-04-18 18:39:37 +02:00
|
|
|
|
|
|
|
static Result<void> exec(StringView path, Slice<String> args, bool search_in_path = true);
|
2023-05-20 12:47:10 +02:00
|
|
|
static Result<void> exec(StringView path, Slice<StringView> args, bool search_in_path = true);
|
2023-04-22 13:54:47 +02:00
|
|
|
static Result<void> exec(StringView path, Slice<String> args, Slice<String> env, bool search_in_path = true);
|
2023-04-18 18:16:24 +02:00
|
|
|
};
|
|
|
|
}
|