Quote:
Originally Posted by
howdini
I have tried to wrap my mind around this particular statement. Does this mean that no terminal based programs can be run successfully from a GUI based application without some special work on the calling command e.g 'system()', or does 'system()' handle this trickery for us. Please enlighten me.
It's not a question of GUI vs non-GUI. The difference between a "window mode" application and a "console mode" application is that the "window mode" application has extra code to talk to an X11 server. It doesn't lack anything a "console" app has.
The dilemma is terminal vs non-terminal. Commands can tell whether their stdin/stdout/stderr is attached to a terminal device or not via the isatty() system call. Nothing but a real or virtual terminal will qualify.
system() doesn't help you arrange a terminal. system() can't even capture the command's output.