mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 09:18:05 +03:00
4674577d80
The names stdout / stderr are bound to conflict with existing declarations when compiling against other LibC's. The build on OpenBSD is broken for this reason at the moment. Lets rename the members to more generic names to resolve the situation.
28 lines
618 B
C++
28 lines
618 B
C++
/*
|
|
* Copyright (c) 2020, Itamar S. <itamar8910@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/LexicalPath.h>
|
|
#include <AK/Optional.h>
|
|
#include <AK/String.h>
|
|
#include <spawn.h>
|
|
|
|
namespace Core {
|
|
|
|
// If the executed command fails, the returned String will be in the null state.
|
|
|
|
struct CommandResult {
|
|
int exit_code { 0 };
|
|
String output;
|
|
String error;
|
|
};
|
|
|
|
ErrorOr<CommandResult> command(String const& program, Vector<String> const& arguments, Optional<LexicalPath> chdir);
|
|
ErrorOr<CommandResult> command(String const& command_string, Optional<LexicalPath> chdir);
|
|
|
|
}
|