Skip to content

Commit

Permalink
Utils Added documentation for SafeSystem() 11/17/2024 | 24w46b1
Browse files Browse the repository at this point in the history
  • Loading branch information
GamesTrap committed Nov 17, 2024
1 parent 0ad1c7f commit 956c471
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion TRAP/src/Utils/SafeSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@

namespace TRAP::Utils
{
//TODO Document
/// @brief Safe replacement for system()/shell calls without invoking a command processor (ENV33-C).
/// @param program Executable to run. Example: "explorer", "xdg-open".
/// @param args Arguments for the executable.
/// @param waitForChild Whether to wait for the called executable to exit or not.
/// @return If waitForChild is false then void on successful invocation,
/// if waitForChild is true then void on successful invocation and normal exit of the executable.
/// String containing an error description otherwise.
/// @threadsafe
[[nodiscard]] TRAP::Expected<void, std::string> SafeSystem(const std::string& program, const std::vector<std::string>& args, bool waitForChild);
}

Expand Down

0 comments on commit 956c471

Please sign in to comment.