Good day to you all
Perhaps you might help me with a little problem?
I am calling a binary from my console c program.
Code:
printf("result of ls\n");
system("ls -lh");
...
When the code is executed from terminal emulator in X, i see ls's output.
But when i run in text mode, i get no output.
How come?
PS:
I understand that system() spawns another shell with fork, right?
And maybe its sort of inherits the shell environment from terminal emulator in X,
and its stdout among other things.
But it doesn't in text mode? Or what?
PPS:
I cant use popen(), becouse i dont want to handle the output myself, ie
if i run system("man something") its man's job to fit its output in terminal, and wait
for up, down, home etc, and i dont want to do it manualy.
Thanks alot.