libcryfs/test/cpp-utils/process/exit_status.cpp
Sebastian Messmer 6f175e0b9b Fix CI
2018-08-07 18:04:32 -07:00

17 lines
372 B
C++

// This is a small executable that prints its first argument and exits with the exit status in its second argument
#include <iostream>
#include <cstdlib>
int main(int argc, char* argv[]) {
if (argc != 3) {
std::cerr << "Wrong number of arguments" << std::endl;
std::abort();
}
std::cout << argv[1];
int exit_status = std::atoi(argv[2]);
return exit_status;
}