mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-26 20:53:08 -08:00
Add helper to get exit status of command
This commit is contained in:
3
util.hpp
3
util.hpp
@@ -63,7 +63,8 @@ std::string our_exe_path ();
|
||||
int exec_command (const std::vector<std::string>&);
|
||||
int exec_command (const std::vector<std::string>&, std::ostream& output);
|
||||
int exec_command_with_input (const std::vector<std::string>&, const char* p, size_t len);
|
||||
bool successful_exit (int status);
|
||||
int exit_status (int wait_status); // returns -1 if process did not exit (but was signaled, etc.)
|
||||
inline bool successful_exit (int wait_status) { return exit_status(wait_status) == 0; }
|
||||
void touch_file (const std::string&);
|
||||
void remove_file (const std::string&);
|
||||
std::string escape_shell_arg (const std::string&);
|
||||
|
||||
Reference in New Issue
Block a user