Answer the question
In order to leave comments, you need to log in
How to make a program that runs in its terminal "window"?
How can I write a C program for Linux so that it runs in a terminal in its own screen space (like nano, vi, man) and closes when it finishes and returns to the initial state of the terminal?
Answer the question
In order to leave comments, you need to log in
well, if I understand your question correctly, then run your program as a child process through system ()
#include <stdio.h>
int main(int argc, char *argv[] )
{
int i = 0;
printf("I am the child\n");
while (--argc)
printf ("Arg %d %s\n", ++i, *++argv);
return 0;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question