Answer the question
In order to leave comments, you need to log in
The application hangs when calling system("ls"); (Qt creator 5.7.0, Debian, Linux). What to do?
In short, when calling the system () function (no matter with what argument),
the application hangs when I run it in Qt Creator 5.7.0 IDE, in debug mode.
The same is observed with the execl() function and so on.
And when I call ./a.out from the command line,
everything works fine.
The application is written in C++.
Thank you in advance!!!
Answer the question
In order to leave comments, you need to log in
The point is that the debugger is trying to debug the ls command, but there are no debug symbols there. To prevent the debugger from debugging third-party processes, you need to go to Options -> Debugger -> GDB Advanced, uncheck the Debug all descendants checkbox.
Hangs, or do not see the answer in the output console? In general, the console is displayed or not? There is such a bug there ...
apart from that, open the system console and enter there (when "the $echo $ application hangs? what will be the answer?
Alexander thanks for the answer.
1.I don’t see an answer,
2.yes, the console is displayed ,
but nothing can be done in it, i.e. you can write, etc. but nothing changes
, and by the way, I get two processes there, and plus the "gdb -i mi" process of the code, I kill the gdb command from system () but the other process does not end.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question