Hi,
The following code segment takes more time (5s) when it is run first time and takes less time(250ms) on consecutive runs. Is there any better way to execute gcc.
int pid,status;
char * argv[] = {"gcc","program.c",NULL};
if(!(pid=fork())){
execvp("gcc",argv);
}
while(pid!=wait(&status)){
//do nothing
}