I have a cpp application that I have compiled on fly machine
#include <string>
int main() {
std::string input;
std::cout << "Please enter some text: ";
std::getline(std::cin, input);
std::cout << "You entered: " << input << std::endl;
return 0;
}
I want to run the compiled executable like this ./program < input.txt
.
contents of input.txt looks like this Hello, this is input from a file.
When I send that command over their REST API
{
"cmd": "./program < input.txt"
}
, I get an error
{
"error": "deadline_exceeded: Post \"http://unix/v1/exec\": context deadline exceeded"
}
I think it is because of the input redirection command or the cin
?? Any idea on what to do now?