source: experiments/checkpoint/test.c @ 16

Revision 16, 402 bytes checked in by mmatloka, 14 years ago (diff)

add experiments

RevLine 
[16]1#include <stdio.h>
2#include <stdlib.h>
3#include <unistd.h>
4
5int main(int argc, char **argv)
6{
7        int i = 0,w=1;
8       
9        if(argc<2)
10        {
11                fprintf(stderr,"N?\n");
12                return 1;
13        }
14        int fd;
15        int maxfd=sysconf(_SC_OPEN_MAX);
16        printf("jestesmy tu: %d",maxfd);
17        for(fd=1; fd<maxfd; fd++)
18                close(fd);
19               
20        sleep(1000);
21        for(i=2;i<=atoi(argv[1]);i++)
22                w*=i;
23               
24        printf("Silnia z %s to %d\n",argv[1],w);
25       
26        return 0;
27}
Note: See TracBrowser for help on using the repository browser.