prog_limit.c
changeset 67 abe63a276a36
parent 64 993b97c4ad2d
child 77 49e0babccb23
equal deleted inserted replaced
66:2b4f786d9073 67:abe63a276a36
    35 
    35 
    36     pid = fork ();
    36     pid = fork ();
    37     switch (pid) {
    37     switch (pid) {
    38     case 0:
    38     case 0:
    39         if (set_limit (atoi (argv[1])) == 0) {
    39         if (set_limit (atoi (argv[1])) == 0) {
    40             i = execvp (argv[2], args);
    40             i = execvp (args[0], args);
    41         } else {
    41         } else {
    42             perror ("Limit Error");
    42             perror ("Limit Error");
    43             return EXIT_FAILURE;
    43             return EXIT_FAILURE;
    44         }
    44         }
    45     case -1:
    45     case -1: