Improvement

This commit is contained in:
6arelyFuture 2021-05-31 12:37:57 +02:00
parent 981ab0ea2a
commit f1edec4201

View File

@ -62,7 +62,7 @@ void checkStatus(FILE *file, int *currRealMem, int *peakRealMem,
} }
int isProcessWild(int currRealMem, int peakRealMem, int isProcessWild(int currRealMem, int peakRealMem,
int currVirtMem, int peakVirtMem, int ID) int currVirtMem, int peakVirtMem, int ID)
{ {
if (currRealMem <= MAX_MEMORY) if (currRealMem <= MAX_MEMORY)
{ {
@ -123,6 +123,12 @@ void setup(const char *pid)
} }
} }
if (i == 0)
{
printf("No process was found\n");
exit(EXIT_SUCCESS);
}
pclose(file); pclose(file);
} }