OF THE WORLD AS WE KNOW IT

This commit is contained in:
thibault62
2016-12-15 10:39:25 +01:00
committed by GitHub
parent 915aa97df4
commit 0c86ee1040
+23
View File
@@ -0,0 +1,23 @@
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/wait.h>
int main(int argv, char *argc){
int pid;
pid=fork();
switch(pid)
{case -1:
printf("error");
break;
case 0:
execl("/home/pierre/Documents/doc/statique/lecture2", "lecture2", NULL);
break;
default:
wait(NULL);
break;
}
return 0;
}