From ccc95c65c68d533f5ed9710571a3b5686f1a4c08 Mon Sep 17 00:00:00 2001 From: 10195501441 <10195501441@stu.ecnu.edu.com> Date: Thu, 18 Mar 2021 15:04:24 +0800 Subject: [PATCH] test mytop --- yeeshell.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/yeeshell.c b/yeeshell.c index 87bc778..c39d9be 100644 --- a/yeeshell.c +++ b/yeeshell.c @@ -354,16 +354,7 @@ int built_in(char **args) } else if (!strcmp(args[0], "mytop")) { - int flag = builtin_mytop(); - if (flag == -1) - { - printf("yeeshell: unable to get memory info.\n"); - } - else if (flag == -2) - { - printf("yeeshell: unable to get CPU info.\n"); - } - return flag; + return builtin_mytop(); } else { @@ -549,7 +540,7 @@ void parse_file(pid_t pid) if (slot < 0 || slot >= nr_total) { - fprintf(stderr, "top: unreasonable endpoint number %d\n", endpt); + //fprintf(stderr, "top: unreasonable endpoint number %d\n", endpt); fclose(fp); return; }