45 lines
359 B
C
45 lines
359 B
C
|
|
#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++){
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|