Stop using exit to make Valgrind happy.
[minishell-2.git] / Sources / main.cpp
blob899fe275643d95684af8e4fa323c49158cc753f1
1 #include "Headers/input.h"
2 #include "Headers/opsys.h"
4 int main(int argc, char ** argv)
6 cout << "miniSHELL 2 -- github.com/vrmiguel/minishell2\n";
7 CLIInputs(argc, argv); // Process command-line arguments
8 Prompt prompt;
9 SignalHandler sighandler;
10 for(;;)
12 string line;
13 prompt.print();
14 std::getline(cin, line);
15 if (sigint)
16 return 0;
17 if (cin.eof())
19 cout << "\nEOF found. Exiting.\n";
20 return 0;
22 if(line.empty())
23 continue;
25 prompt.parse(line);
26 prompt.run();
28 return 0;