mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 12:42:45 +00:00 
			
		
		
		
	 4674577d80
			
		
	
	
		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.
		
			
				
	
	
		
			27 lines
		
	
	
	
		
			618 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			27 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);
 | |
| 
 | |
| }
 |