#include <stdio.h>
#include <unistd.h>
main(){
char *arglist[3];
arglist[0]="ls";
arglist[1]="-l";
arglist[2]=0;
printf("ls -l\n");
execvp("ls",arglist);
printf("ls is done\n");
}
execvp族的示例—所谓旧瓶装新酒
最新推荐文章于 2021-08-16 14:07:48 发布