Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- app1:
- #include <iostream>
- int main(int, char *[])
- {
- std::string s;
- while (1)
- {
- std::cin >> s;
- std::cout << s;
- }
- return 0;
- }
- app2 (Qt):
- #include <QProcess>
- int main(int, char *[])
- {
- QProcess p;
- p.start("/home/my/dev/build-app2-Desktop_Qt_5_5_1_GCC_64bit-Debug/app2");
- for (quint64 i = 0; i < 100000; i++)
- p.write("0000000000000000000000000000000000000000000000000000000\n");
- QString s = p.readAllStandardOutput(); //crash after this called
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement