I need to open a terminal to run a process. I've got it working, but it feels "dirty". There must be a better way, and I've read a lot about system() being bad.
My working code:
1 2 3 4 5
// Open the process
system("gnome-terminal -x nano ~./test.txt");
// close the process
system("pkill nano");
The process will remain open until the user presses a button to invoke the kill command.