If i run a console application (hello world) on linux with the xfce4-terminal or the gnome-terminal the console outputs "process terminated 0" but the console application is still running in the foreground.
So it is not possible the terminate the running console program in codeblocks.
after reading some time, i found out, that this two terminals fork themself after executing the command from the command line argument, and close immediately. To prevent this behaviour i suggest the attached patch: add command line argument to "--wait" and "--disable-server"
i could not test the other two consoles on my linux machine
The main problem is - would this work on all systems we support out of the box. According to the linked topic - gnome-terminal requires version 3.28 (which is relatively new - released on 2018-03-12, according to wikipedia). No idea about the xfce option and if it works on all supported OSes/distros.
Ubuntu 18.04 supports --wait, so it might not be that bad.
Ubuntu 16.04 doesn't have it and there we would fail to start a terminal.
CentOS 7 supports --wait.
So, I suppose go on with this and lets see how many people complain.
The option in terminology is
But I don't seem to need it in my version. The reuse of processes is an option, but I'm not sure what is the default.
edit: -s is the way to go and it is safe to use even if the option for reuse of processes is not enabled.
Last edit: Teodor Petrov 2021-07-01
should we try to check the version of the terminal with a squirrel script?
Nope, push as is and lets see if somebody complains first.
If needed I can test binaries on Linux Mint 20.1 XFCE and XUbuntu 2004 ruining a guests on Virtual Box.
@bluehazzard Would you push this?
in r12488