mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-13 09:33:50 +00:00
For PR351:
* Fix commentary, wrap lines, etc. * Add an environment pointer to the ExecuteAndWait function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18926 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f6e5a25f3a
commit
a077c9a0a2
@ -22,8 +22,8 @@ namespace sys {
|
|||||||
|
|
||||||
/// This class provides an abstraction for programs that are executable by the
|
/// This class provides an abstraction for programs that are executable by the
|
||||||
/// operating system. It provides a platform generic way to find executable
|
/// operating system. It provides a platform generic way to find executable
|
||||||
/// programs from the path and to execute them. The sys::Path class is used to
|
/// programs from the path and to execute them in various ways. The sys::Path
|
||||||
/// locate the Program.
|
/// class is used to specify the location of the Program.
|
||||||
/// @since 1.4
|
/// @since 1.4
|
||||||
/// @brief An abstraction for finding and executing programs.
|
/// @brief An abstraction for finding and executing programs.
|
||||||
class Program {
|
class Program {
|
||||||
@ -43,22 +43,27 @@ namespace sys {
|
|||||||
/// waits for the program to exit. This function will block the current
|
/// waits for the program to exit. This function will block the current
|
||||||
/// program until the invoked program exits. The invoked program will
|
/// program until the invoked program exits. The invoked program will
|
||||||
/// inherit the stdin, stdout, and stderr file descriptors, the
|
/// inherit the stdin, stdout, and stderr file descriptors, the
|
||||||
/// environment and other configuration settings of the inoking program.
|
/// environment and other configuration settings of the invoking program.
|
||||||
/// If Path::executable() does not return true when this function is
|
/// If Path::executable() does not return true when this function is
|
||||||
/// called then a std::string is thrown.
|
/// called then a std::string is thrown.
|
||||||
/// Path::executable() returns true.
|
|
||||||
/// @param path A sys::Path object providing the path of the program to be
|
/// @param path A sys::Path object providing the path of the program to be
|
||||||
/// executed. It is presumed this is the result of the FindProgramByName
|
/// executed. It is presumed this is the result of the FindProgramByName
|
||||||
/// method.
|
/// method.
|
||||||
/// @param args A vector of strings that are passed to the program.
|
|
||||||
/// The first element should *not* be the name of the program.
|
|
||||||
/// @returns an integer result code indicating the status of the program.
|
/// @returns an integer result code indicating the status of the program.
|
||||||
/// @throws std::string on a variety of error conditions or if the invoked
|
/// @throws std::string on a variety of error conditions or if the invoked
|
||||||
/// program aborted abnormally.
|
/// program aborted abnormally.
|
||||||
/// @see FindProgrambyName
|
/// @see FindProgrambyName
|
||||||
/// @brief Executes the program with the given set of \p arguments.
|
/// @brief Executes the program with the given set of \p args.
|
||||||
static int ExecuteAndWait(const Path& path,
|
static int ExecuteAndWait(
|
||||||
const std::vector<std::string>& args);
|
const Path& path, ///< The path to the program to execute
|
||||||
|
const std::vector<std::string>& args,
|
||||||
|
///< A vector of strings that are passed to the program.
|
||||||
|
///< The first element should *not* be the name of the program.
|
||||||
|
const char ** env = 0
|
||||||
|
///< An optional vector of strings to use for the program's
|
||||||
|
///< environment. If not provided, the current program's environment
|
||||||
|
///< will be used.
|
||||||
|
);
|
||||||
/// @}
|
/// @}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user