changement du fichier tp scr
This commit is contained in:
45
TP_SCR3.1/TP_Tubes/ex11.c
Normal file
45
TP_SCR3.1/TP_Tubes/ex11.c
Normal file
@@ -0,0 +1,45 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <assert.h>
|
||||
#include <sys/wait.h>
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
|
||||
|
||||
if(argc != 3) {
|
||||
|
||||
fprintf(stderr, "Usage :%s <max> <n>\n",argv[0]);
|
||||
return 1;
|
||||
|
||||
|
||||
}
|
||||
|
||||
int maxv = atoll(argv[1]);
|
||||
int n = atoi(argv[2]);
|
||||
|
||||
int p[2];
|
||||
pipe(p);
|
||||
|
||||
|
||||
for(int k=0; k<k*n; k++){
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user