在下面的代码中,我system使用"gedit filename". 它正在gedit  正确打开指定的文件。
但是,在下一行中,我试图打印修改后的数据(我将通过 更新gedit),但它不会等到gedit退出。
strcpy(tt1,"gedit ");
strcat(tt1,tt);
system(tt1);                     //here gedit opens file
printf("\nFile data %s  Location %s",getFileData(tt),tt); //this line executes before finishing gedit
请帮我等到system()通话完成。