prog_limit.c
changeset 51 a03372ef9714
parent 48 b94d657a9acb
child 60 47c13ca8c4d0
equal deleted inserted replaced
50:a38f102556e5 51:a03372ef9714
    31     for (i = 2; i < argc; i++)
    31     for (i = 2; i < argc; i++)
    32         args[i - 2] = argv[i];
    32         args[i - 2] = argv[i];
    33 
    33 
    34     args[i] = NULL;
    34     args[i] = NULL;
    35 
    35 
    36     if (set_limit (atoi (argv[1]) * 1024 * 1024) == 0)
    36     if (set_limit (atoi (argv[1])) == 0)
    37         execvp (argv[2], args);
    37         execvp (argv[2], args);
    38     else
    38     else
    39         perror ("Limit Error");
    39         perror ("Limit Error");
    40 
    40 
    41     if (args != NULL)
    41     if (args != NULL)