mirror of
https://github.com/AGWA/git-crypt.git
synced 2025-12-25 12:24:20 -08:00
Add helper to get exit status of command
This commit is contained in:
@@ -273,9 +273,9 @@ int exec_command_with_input (const std::vector<std::string>& command, const char
|
||||
return status;
|
||||
}
|
||||
|
||||
bool successful_exit (int status)
|
||||
int exit_status (int wait_status)
|
||||
{
|
||||
return status != -1 && WIFEXITED(status) && WEXITSTATUS(status) == 0;
|
||||
return wait_status != -1 && WIFEXITED(wait_status) ? WEXITSTATUS(wait_status) : -1;
|
||||
}
|
||||
|
||||
void touch_file (const std::string& filename)
|
||||
|
||||
Reference in New Issue
Block a user